This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Sockets and Internet Protocols and the fly likes Simple client / server not success Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Simple client / server not success" Watch "Simple client / server not success" New topic

Simple client / server not success

adeeb alexander
Ranch Hand

Joined: May 29, 2008
Posts: 268
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.



Please tell me what are the changes required.
Thanks and Regards
Joe Ess

Joined: Oct 29, 2001
Posts: 8876

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.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
subject: Simple client / server not success