Urho.Network.Connection Class

Connection to a remote network host.

See Also: Connection

Syntax

public class Connection : UrhoObject

Remarks

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.

Requirements

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

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

[read-only]
AddressString. Return remote address.
[read-only]
BytesInPerSecSingle. Return bytes received per second.
[read-only]
BytesOutPerSecSingle. Return bytes sent per second.
[read-only]
ClientBoolean. Return whether is a client connection.
[read-only]
ConnectedBoolean. Return whether is fully connected.
ConnectPendingBoolean. Return whether connection is pending.
ControlsControls.
[read-only]
DownloadNameString. Return name of current package download, or empty if no downloads.
[read-only]
DownloadProgressSingle. Return progress of current package download, or 1.0 if no downloads.
[read-only]
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.
[read-only]
NumDownloadsUInt32. Return number of package downloads remaining.
[read-only]
PacketsInPerSecSingle. Return packets received per second.
[read-only]
PacketsOutPerSecSingle. Return packets sent per second.
[read-only]
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.
[read-only]
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.
[read-only]
SceneLoadedBoolean. Return whether the scene is loaded and ready to receive server updates.
[read-only]
TimeStampByte. Return the controls timestamp, sent from client to server along each control update.
[read-only]
override
TypeStringHash. Urho's type system type.
[read-only]
override
TypeNameString. Urho's low-level type name.
[read-only]
static
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
[read-only]
static
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

ConfigureNetworkSimulator(Int32, Single)
Set network simulation parameters. Called by Network.
Disconnect(Int32)
Disconnect. If wait time is non-zero, will block while waiting for disconnect to finish.
ProcessPendingLatestData()
Process pending latest data for nodes and components.
SendClientUpdate()
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.
SendPackages()
Send package files to client. Called by network.
SendPackageToClient(PackageFile)
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.
SendRemoteEvents()
Send queued remote events. Called by Network.
SendServerUpdate()
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.
ClientSceneLoaded