NetworkDesign: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Fixed Polling link |
imported>StephenIerodiaconou |
||
| Line 36: | Line 36: | ||
Messages are sent from the Server by simply serializing them. So the message itself contains the protocol version, the type of message and the Client id. |
Messages are sent from the Server by simply serializing them. So the message itself contains the protocol version, the type of message and the Client id. |
||
Receiving the message is a bit more complex. First we need to determine that we are running a compatible version of the protocol by comparing the protocol version with the expected version in the message. Once we have agreed that the protocol is compatible we read the type of message and we ask the Message Factory ( |
Receiving the message is a bit more complex. First we need to determine that we are running a compatible version of the protocol by comparing the protocol version with the expected version in the message. Once we have agreed that the protocol is compatible we read the type of message and we ask the Message Factory ( see [[RolePlayingDesign]]) to build an object of that type with the corresponding data. Once the message is built we simply store it in a queue of incoming messages waiting to be processed. |
||
=Network Manager= |
=Network Manager= |
||