Writing a server and client in the same class
843790Jan 30 2008 — edited Feb 9 2008Hi guys,
I'm trying to combine a server and client together into one class. Basicly I'm stuck for when I have to listen to the port I have chosen and also connect etc. I was wondering if anyone has any advice etc as the application I'm writing is supposed to be both a server and a client and this project will be a peer to peer game.
I'm willing to post the code for the server and client which I have written already but it's just confusing on how to combine them as this is the first networking java application I've done.
Let me know if anyone wants any more info :)
Thanks,
Ben