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.
|ClientConnectedEventArgs||Event arguments for the Network's ClientConnected event|
|ClientDisconnectedEventArgs||Event arguments for the Network's ClientDisconnected event|
|ClientIdentityEventArgs||Event arguments for the Connection's ClientIdentity event|
|ClientSceneLoadedEventArgs||Event arguments for the Connection's ClientSceneLoaded event|
|ConnectFailedEventArgs||Event arguments for the Network's ConnectFailed event|
|Connection||Connection to a remote network host.|
|HttpRequest||An HTTP connection with response data stream.|
|HttpRequestState||HTTP connection state|
|Network||Network subsystem. Manages client-server communications using the UDP protocol.|
|NetworkMessageEventArgs||Event arguments for the Network's NetworkMessage event|
|NetworkPriority||%Network interest management settings component.|
|NetworkSceneLoadFailedEventArgs||Event arguments for the Network's NetworkSceneLoadFailed event|
|NetworkUpdateEventArgs||Event arguments for the Network's NetworkUpdate event|
|NetworkUpdateSentEventArgs||Event arguments for the Network's NetworkUpdateSent event|
|ObserverPositionSendMode||Send modes for observer position/rotation. Activated by the client setting either position or rotation.|
|ServerConnectedEventArgs||Event arguments for the Network's ServerConnected event|
|ServerDisconnectedEventArgs||Event arguments for the Network's ServerDisconnected event|