There are currently four types of events supplied by the
As mentioned, there are a few subtle differences running the driver as a host or client. Mainly when it comes to consumption of events.
Both your client and your server loop will want to consume the events that are produced by the
NetworkDriver. And you do so by either calling
PopEvent on each
NetworkConnection similar to how we did before.
You can try calling the
PopEventForConnection on the
NetworkDriver as we did in the ServerBehaviour example:
There is no real difference between these calls, both calls will do the same thing. Its just how you want to phrase yourself when writing the code.
And finally to receive a new
NetworkConnection on the Driver while Listening you can call
This event is only available if the
2. A socket timeout occurred.
3. Maximum connect attempts on the
If you call