Results 1 to 2 of 2
  1. #1
    gyijhbk is offline Member
    Join Date
    Feb 2012
    Rep Power

    Default I have a problem with the two-way socket

    I have a problem with the two-way socket.
    Java Code:
    			Socket connectionSocket2 = welcomeSocket.accept();
    				BufferedReader inFromClient2 =
                    new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));
    String s=connectionSocket2.readLine();			
    the output is null.why this is happening?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Voorschoten, the Netherlands
    Blog Entries
    Rep Power

    Default Re: I have a problem with the two-way socket

    Shouldn't you read from the inFromClient2 reader?

    kind regards,

    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. Another socket (multiclient) problem....
    By Lionlev in forum Networking
    Replies: 35
    Last Post: 06-06-2012, 04:49 PM
  2. POP3 Client Socket Problem
    By danielinthebed in forum New To Java
    Replies: 1
    Last Post: 02-15-2012, 04:09 PM
  3. Socket connection Problem
    By ighor10 in forum Networking
    Replies: 3
    Last Post: 06-23-2010, 04:10 AM
  4. Socket Connection problem
    By xpan in forum Networking
    Replies: 4
    Last Post: 02-14-2010, 05:32 PM
  5. Simple Socket Problem
    By barusk in forum Networking
    Replies: 0
    Last Post: 12-14-2009, 05:43 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