• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Simple client / server not success

 
adeeb alexander
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a echo server and echo client. whenever i send a line to server, it is seen at the server. But i want to send the line through the server and should receive at client. How can i do so. Some body please help. Here's the code.

EchoServer



EchoClient



Please tell me what are the changes required.
Thanks and Regards
adeeb.
 
Joe Ess
Bartender
Posts: 9302
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code as you posted works fine for me:



By the way, using code that depends on end-of-line markers (BufferedReader, Scanner) is not recommended when programming sockets as EOL is OS-dependent.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic