Urho.Network.Connection Class

Connection to a remote network host.

See Also: Connection


public class Connection : UrhoObject


On the client, this object is retrieved after a successful connection from the Network.ServerConnection property.   On the server, a new instance of this object is created for every connected client.


Namespace: Urho.Network
Assembly: Urho (in Urho.dll)
Assembly Versions:

The members of Urho.Network.Connection are listed below.

See Also: UrhoObject

Public Constructors

Constructs a new instance of Urho.Network.Connection, given a raw pointer to an unmanaged object

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

AddressString. Return remote address.
BytesInPerSecSingle. Return bytes received per second.
BytesOutPerSecSingle. Return bytes sent per second.
ClientBoolean. Return whether is a client connection.
ConnectedBoolean. Return whether is fully connected.
ConnectPendingBoolean. Return whether connection is pending.
DownloadNameString. Return name of current package download, or empty if no downloads.
DownloadProgressSingle. Return progress of current package download, or 1.0 if no downloads.
LastHeardTimeSingle. Return the time since last received data from the remote host in milliseconds.
LogStatisticsBoolean. Return whether to log data in/out statistics. Or Set whether to log data in/out statistics.
NumDownloadsUInt32. Return number of package downloads remaining.
PacketsInPerSecSingle. Return packets received per second.
PacketsOutPerSecSingle. Return packets sent per second.
PortUInt16. Return remote port.
PositionVector3. Return the observer position sent by the client for interest management. Or Set the observer position for interest management, to be sent to the server.
RotationQuaternion. Return the observer rotation sent by the client for interest management. Or Set the observer rotation for interest management, to be sent to the server. Note: not used by the NetworkPriority component.
RoundTripTimeSingle. Return the connection's round trip time in milliseconds.
SceneScene. Return the scene used by this connection. Or Assign scene. On the server, this will cause the client to load it.
SceneLoadedBoolean. Return whether the scene is loaded and ready to receive server updates.
TimeStampByte. Return the controls timestamp, sent from client to server along each control update.
TypeStringHash. Urho's type system type.
TypeNameString. Urho's low-level type name.
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

ConfigureNetworkSimulator(Int32, Single)
Set network simulation parameters. Called by Network.
Disconnect. If wait time is non-zero, will block while waiting for disconnect to finish.
Process pending latest data for nodes and components.
Send latest controls from the client. Called by Network.
SendMessage(Int32, Boolean, Boolean, Byte[], UInt32)
Sends a message over the connection.
SendMessage(Int32, Boolean, Boolean, Byte*, UInt32, UInt32)
Sends a message over the connection.
Send package files to client. Called by network.
Trigger client connection to download a package file from the server. Can be used to download additional resource packages when client is already joined in a scene. The package must have been added as a requirement to the scene the client is joined in, or else the eventual download will fail.
Send queued remote events. Called by Network.
Send scene update messages. Called by Network.
SubscribeToClientIdentity(Action<ClientIdentityEventArgs>) : Subscription
Subscribes to the ClientIdentity event raised by the Connection.
SubscribeToClientSceneLoaded(Action<ClientSceneLoadedEventArgs>) : Subscription
Subscribes to the ClientSceneLoaded event raised by the Connection.
ToDebugString() : String
Return an address:port string.

Public Events

ClientIdentityEvent raised on the server after the connection and contains the client identity information.   The default is to accept all connections.