• Post Reply Bookmark Topic Watch Topic
  • New Topic

server/client program  RSS feed

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i pretty much re-typed the code from the oracle tutorial for sockets, but somehow it's not working.

i ran with

java Server 7
java Client localhost 7

with two consoles open.
i entered an input string for the Client console, but i'm not getting any echoes back.

i've checked and rechecked but i can't find what's missing.

Client.java


Server.java


the original codes are below:
http://docs.oracle.com/javase/tutorial/networking/sockets/examples/EchoClient.java
http://docs.oracle.com/javase/tutorial/networking/sockets/examples/EchoServer.java
 
Sheriff
Posts: 22846
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest starting with an exact copy of the tutorial classes, and see if they work.

And anyway if you changed something in those tutorial classes, that's probably what broke them. You would be in a much better place to tell what you changed than we would.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!