Urho.Network Namespace

Networking support for client/server communication between networked UrhoSharp programs.


The Network subsystem provides reliable and unreliable UDP messaging using kNet. A server can be created that listens for incoming connections, and client connections can be made to the server. After connecting, code running on the server can assign the client into a scene to enable scene replication, provided that when connecting, the client specified a blank scene for receiving the updates.

Scene replication is one-directional: the server always has authority and sends scene updates to the client at a fixed update rate, by default 30 FPS. The client responds by sending controls updates (buttons, yaw and pitch + possible extra data) also at a fixed rate.

Bidirectional communication between the server and the client can happen either using raw network messages, which are binary-serialized data, or remote events, which operate like ordinary events, but are processed on the receiving end only. Code on the server can send messages or remote events either to one client, all clients assigned into a particular scene, or to all connected clients. In contrast the client can only send messages or remote events to the server, not directly to other clients.

Note that if a particular networked application does not need scene replication, network messages and remote events can also be transmitted without assigning the client to a scene. The Chat example does just that: it does not create a scene either on the server or the client.


ClientConnectedEventArgsEvent arguments for the Network's ClientConnected event
ClientDisconnectedEventArgsEvent arguments for the Network's ClientDisconnected event
ClientIdentityEventArgsEvent arguments for the Connection's ClientIdentity event
ClientSceneLoadedEventArgsEvent arguments for the Connection's ClientSceneLoaded event
ConnectFailedEventArgsEvent arguments for the Network's ConnectFailed event
ConnectionConnection to a remote network host.
HttpRequest An HTTP connection with response data stream.
HttpRequestState HTTP connection state
NetworkNetwork subsystem. Manages client-server communications using the UDP protocol.
NetworkMessageEventArgsEvent arguments for the Network's NetworkMessage event
NetworkPriority %Network interest management settings component.
NetworkSceneLoadFailedEventArgsEvent arguments for the Network's NetworkSceneLoadFailed event
NetworkUpdateEventArgsEvent arguments for the Network's NetworkUpdate event
NetworkUpdateSentEventArgsEvent arguments for the Network's NetworkUpdateSent event
ObserverPositionSendMode Send modes for observer position/rotation. Activated by the client setting either position or rotation.
ServerConnectedEventArgsEvent arguments for the Network's ServerConnected event
ServerDisconnectedEventArgsEvent arguments for the Network's ServerDisconnected event