Home Help Center

UDP server architecture

I had a question about using UDP in relation to a game state server I am implementing.

I have an interface whereby the client sends an update 'frame' which has the clients current position and velocity.

I am not concerned about reliability so was wanting to use UDP for the transport.

I have 2 options on the server side :
(i) On receipt of the client update, the server returns an update back to the client with the relevant world state for the client.

(ii) The server periodically sends updates to all connected clients with the relevant world state.

How would i achieve this using UDP as a transport. In particular, how does the server know the client endpoints to send messages back to.

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Please have a look at the callback demo in demo/Ice/callback, which also shows how callbacks work with UDP.
Sign In or Register to comment.