View Single Post
  #12   Spotlight this post!  
Unread 19-01-2012, 16:55
MohammadAdib MohammadAdib is offline
Outside-of-the-box thinker
FRC #0948 (NRG948)
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Bellevue WA
Posts: 7
MohammadAdib is an unknown quantity at this point
Re: Is TCP communication allowed in-game?

I just wrote and tested this very simple code for a threaded TCP server template using Java. The server is fully threaded and can read input from incoming clients. There is no limit to how many clients can connect. It uses a thread to search for new clients and once a client connects another thread is started for reading input from that client's socket.

Feel free to use the code as it is a template, but please do not remove the credit comment on the top

Download the file from below:
Attached Files
File Type: java TCPServer.java (2.5 KB, 23 views)