java - Making a client-server chat - running into issues with connecting client to client -
i trying learn how make multiple-client chatting program. im following oracle tutorial on custom networking, not looking for. far, have no code of own share, of copied oracle tutorial , think pasting here copyright infringement(??).
link at: http://docs.oracle.com/javase/tutorial/networking/sockets/clientserver.html+
client code link: http://docs.oracle.com/javase/tutorial/displaycode.html?code=http://docs.oracle.com/javase/tutorial/networking/sockets/examples/knockknockclient.java
anyway, have server-client working server tells knock knock jokes, client reads , prints, user replies , on. how start edit have client talk other clients directly?
im sorry, have no background networking @ all. if can direct me informative source better suited goals appreciate it.
as in knock-knock example, each client connects server, not mutually directly connected.
there solution make forwarding sever :arrange each client id, , clients use id identify talking partners.
to this, have modify client server data format plain string tuple (string,id). and, when server receive data, parses out id, corresponding client socket , write data.
Comments
Post a Comment