Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can someone explain me? (ServerSocket)

 
Julio Cesar Marques
Ranch Hand
Posts: 80
BSD Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServerSocket theServer = new ServerSocket(port);
Socket client = theServer.accept();
/**
*
client.getInputStream() EXISTS!
client.getOutputStream() EXISTS!
*
*/

new Thread(HndSock(client)).start();
--> Inner Thread...
/**
*
client.getInputStream() IS NULL!
client.getOutputStream() IS NULL!
*
*/

Why? I Like to understand whats happens?
Why the Object client inner the thread is not null BUT your streams are?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic