• Post Reply Bookmark Topic Watch Topic
  • New Topic

Client Socket do not receive any response data  RSS feed

 
Fernando Skackauskas
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have a program (Server) that receives data via socket and must return to the other computer (Client) a response data.

But when I send the response to the client, it does not get any data. And the Server does not accuse any error messages.

What can be wrong with the program?

Below code where the receiving and sending of messages occurs:



Thanks,

Fernando
 
Ron McLeod
Saloon Keeper
Posts: 1601
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your code has multiple errors such as vector String rather than String vector and getOutPutStream () rather than getOutputStream(). You will see these and other errors when you compile it. Clean-up the issues and it will run as expected.

# telnet 192.168.100.125 2712
Trying 192.168.100.125...
Connected to 192.168.100.125.
Escape character is '^]'.
Hello
return = Hello
Connection closed by foreign host.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!