Overview of Communication between client and server

The communication between client and server in ProudNet is handled by unit of message. One message responds to one time RMI call(refer to Remote Method Invocation).

ProudNet's client-server communication support both reliable and unreliable communication (refer to Protocol type of ProudNet)

When client is connected to server, first the communication will be made in TCP. Meanwhile, it performs UDP hole-punching with the server in the background. If UDP hole-punching with the server succeeds then it also enables UDP communication. Before UDP hole-punching, all reliable and unreliable messaging will be replaced by TCP. But after UDP hole-punching, Reliable messaging will be replaced by UDP. Client communicates with server with 1 TCP port and 1 UDP port. On the other hand, server communicates with 1 TCP listening port and more than 1 of UDP port.

As maintaining the TCP connection between client and server, one of UDP ports at the server side will be selected to communicate with client. This means server uses and shares its several UDP ports with every client connected to that server. For instance, if 40,000 clients communicate with a server with 20,000 UDP ports open, approximately 2 clients per 1 UDP port would communicate.

mmorpg.jpg
Many massive scaled online game utilize the client-server communication. “Below picture is one of the most massive online games, World of Warcraft.