File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 9189

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.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: Simple client / server not success
It's not a secret anymore!