Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By bakstar

Thread: Socket

  1. #1
    baggio90 is offline Member
    Join Date
    Sep 2012
    Rep Power

    Default Socket

    I am new Socket programming and i try to write chat program (client/server)
    and programs shot this Exeption

    Exception Occured:
    Why shot i dont know :(

    Socket toServer=new Socket("machine-name",1001);
    Help Please

  2. #2
    bakstar is offline Member
    Join Date
    Nov 2012
    Rep Power

    Default Re: Socket

    "machine-name" is probably not a real host. You need to have the exact host name or its IP address.

    If your trying to connect to localhost try ""
    Jire likes this.

  3. #3
    Potato is offline Member
    Join Date
    Dec 2011
    Rep Power

    Default Re: Socket

    Try using "\\machine-name"

    Make sure you are on the same network.

Similar Threads

  1. Socket Programming ERROR : Socket not connected
    By vishrut_n_shah in forum Networking
    Replies: 0
    Last Post: 11-04-2011, 10:32 AM
  2. Socket help
    By 80mins in forum New To Java
    Replies: 3
    Last Post: 05-31-2011, 04:08 PM
  3. Replies: 1
    Last Post: 07-02-2010, 02:18 PM
  4. Socket
    By Syahrul in forum New To Java
    Replies: 0
    Last Post: 12-20-2009, 02:31 PM
  5. append response to the request from Socket and write to another socket
    By in forum Networking
    Replies: 3
    Last Post: 04-17-2009, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts