Home arrow static arrow Java Programming [Archive] - Port listening for server
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Port listening for server
This topic has 1 reply on 1 page.

Posts:1
Registered: 7/17/04
Port listening for server  
Jul 17, 2004 1:13 AM



 
I am trying to create a multiplayer game that sends information to a central computer on my netwok. How would i go about making a java class that once started on the computer, would listen in on a port for information then trigger a method for whenever it recieves information in that port for storing the information into a variable/array?
Thank you in advance!
 

Posts:11,200
Registered: 7/22/99
Re: Port listening for server  
Jul 17, 2004 1:27 AM (reply 1 of 1)



 
You would use a ServerSocket for that:
http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html
http://www.javaalmanac.com/egs/java.net/CreateServerSocket.html
 
This topic has 1 reply on 1 page.