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

    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();			
    	System.out.println(s);
    the output is null.why this is happening?

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,436
    Blog Entries
    7
    Rep Power
    20

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

    Shouldn't you read from the inFromClient2 reader?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

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, 03: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, 04:32 PM
  5. Simple Socket Problem
    By barusk in forum Networking
    Replies: 0
    Last Post: 12-14-2009, 04: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
  •