AtomicNET : AtomicEngine Namespace

Network Class

%Network subsystem. Manages client-server communications using the UDP protocol.

Syntax

public class Network : AObject

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from AObject.

Public Constructors

Documentation for this section has not yet been entered.
Construct.

Public Fields

nativeInstance IntPtr . Documentation for this section has not yet been entered. (Inherited from RefCounted.)

Public Properties

[read-only]
Category string . Documentation for this section has not yet been entered. (Inherited from AObject.)
[read-only]
ClientConnections Vector<Connection> . Documentation for this section has not yet been entered.
[read-only]
Context Context . Documentation for this section has not yet been entered. (Inherited from AObject.)
[read-only]
EventSender AObject . Documentation for this section has not yet been entered. (Inherited from AObject.)
InstantiationType InstantiationType . Documentation for this section has not yet been entered. (Inherited from RefCounted.)
[read-only]
NativeInstance IntPtr . Documentation for this section has not yet been entered. (Inherited from RefCounted.)
PackageCacheDir string . Documentation for this section has not yet been entered.
[read-only]
ServerConnection Connection . Documentation for this section has not yet been entered.
[read-only]
ServerPort ushort . Documentation for this section has not yet been entered.
[read-only]
ServerRunning bool . Documentation for this section has not yet been entered.
SimulatedLatency int . Documentation for this section has not yet been entered.
SimulatedPacketLoss float . Documentation for this section has not yet been entered.
[read-only]
TypeName string . Documentation for this section has not yet been entered. (Inherited from AObject.)
[read-only]
TypeName string . Documentation for this section has not yet been entered. (Inherited from RefCounted.)
[read-only]
TypeNameStatic string . Documentation for this section has not yet been entered. (Inherited from AObject.)
UpdateFps int . Documentation for this section has not yet been entered.

Public Methods

AddRef ()
Increment reference count. Can also be called outside of a SharedPtr for traditional reference counting. (Inherited from RefCounted.)
AddRefSilent ()
Increment reference count. Do not call any lifetime book keeping (Inherited from RefCounted.)
BroadcastRemoteEvent (StringHash, bool)
Broadcast a remote event to all client connections.
BroadcastRemoteEvent (Node, StringHash, bool)
Broadcast a remote event with the specified node as a sender. Is sent to all client connections in the node's scene.
BroadcastRemoteEvent (Scene, StringHash, bool)
Broadcast a remote event to all client connections in a specific scene.
CheckRemoteEvent (StringHash) : bool
Return whether a remote event is allowed to be received.
Connect (string, ushort, Scene) : bool
Connect to a server using UDP protocol. Return true if connection process successfully started.
static
csb_Atomic_Network_GetClassIDStatic () : IntPtr
Documentation for this section has not yet been entered.
Disconnect (int)
Disconnect the connection to the server. If wait time is non-zero, will block while waiting for disconnect to finish.
GetCategory () : string
Return object category. Categories are (optionally) registered along with the object factory. Return an empty string if the object category is not registered. (Inherited from AObject.)
GetClientConnections () : Vector<Connection>
Return all client connections.
GetContext () : Context
Return execution context. (Inherited from AObject.)
GetEventSender () : AObject
Return active event sender. Null outside event handling. (Inherited from AObject.)
GetInstantiationType () : InstantiationType
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
GetPackageCacheDir () : string
Return the package download cache directory.
GetServerConnection () : Connection
Return the connection to the server. Null if not connected.
GetServerPort () : ushort
Documentation for this section has not yet been entered.
GetSimulatedLatency () : int
Return simulated latency in milliseconds.
GetSimulatedPacketLoss () : float
Return simulated packet loss probability.
GetSubsystem (StringHash) : AObject
Return subsystem by type. (Inherited from AObject.)
override
GetTypeName () : string
Return type name. (Inherited from AObject.)
GetTypeName () : string
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
GetUpdateFps () : int
Return network update FPS.
HasEventHandlers () : bool
Return whether has subscribed to any event. (Inherited from AObject.)
HasSubscribedToEvent (StringHash) : bool
Return whether has subscribed to an event without specific sender. (Inherited from AObject.)
HasSubscribedToEvent (AObject, StringHash) : bool
Return whether has subscribed to a specific sender's event. (Inherited from AObject.)
IsInstanceOf (StringHash) : bool
Check current instance is type of specified type. (Inherited from AObject.)
override
IsObject () : bool
Documentation for this section has not yet been entered. (Inherited from AObject.)
IsObject () : bool
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
IsServerRunning () : bool
Return whether the server is running.
PostUpdate (float)
Send outgoing messages after frame logic. Called by HandleRenderUpdate.
Refs () : int
Return reference count. (Inherited from RefCounted.)
RegisterRemoteEvent (StringHash)
Register a remote event as allowed to be received. There is also a fixed blacklist of events that can not be allowed in any case, such as ConsoleCommand.
ReleaseRef ()
Decrement reference count and delete self if no more references. Can also be called outside of a SharedPtr for traditional reference counting. (Inherited from RefCounted.)
SendEvent (string, ScriptVariantMap)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SendPackageToClients (Scene, PackageFile)
Trigger all client connections in the specified scene to download a package file from the server. Can be used to download additional resource packages when clients are already joined in the scene. The package must have been added as a requirement to the scene, or else the eventual download will fail.
SetInstantiationType (InstantiationType)
Documentation for this section has not yet been entered. (Inherited from RefCounted.)
SetPackageCacheDir (string)
Set the package download cache directory.
SetSimulatedLatency (int)
Set simulated latency in milliseconds. This adds a fixed delay before sending each packet.
SetSimulatedPacketLoss (float)
Set simulated packet loss probability between 0.0 - 1.0.
SetUpdateFps (int)
Set network update FPS.
StartServer (ushort) : bool
Start a server on a port using UDP protocol. Return true if successful.
StopServer ()
Stop the server.
SubscribeToEvent (string, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent (uint, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent (AObject, string, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent (AObject, uint, EventDelegate)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent<T> (NativeEventDelegate<T>)
Documentation for this section has not yet been entered. (Inherited from AObject.)
SubscribeToEvent<T> (AObject, NativeEventDelegate<T>)
Documentation for this section has not yet been entered. (Inherited from AObject.)
UnregisterAllRemoteEvents ()
Unregister all remote events.
UnregisterRemoteEvent (StringHash)
Unregister a remote event as allowed to received.
UnsubscribeFromAllEvents ()
Documentation for this section has not yet been entered. (Inherited from AObject.)
UnsubscribeFromEvent (StringHash)
Unsubscribe from an event. (Inherited from AObject.)
UnsubscribeFromEvent (uint)
Documentation for this section has not yet been entered. (Inherited from AObject.)
UnsubscribeFromEvent (AObject, StringHash)
Unsubscribe from a specific sender's event. (Inherited from AObject.)
UnsubscribeFromEvent<T> ()
Documentation for this section has not yet been entered. (Inherited from AObject.)
UnsubscribeFromEventReceiver (AObject)
Unsubscribe from event for specific receiver (where the event handler isn't necessarily in the subscribed object) (Inherited from AObject.)
UnsubscribeFromEvents (AObject)
Unsubscribe from a specific sender's events. (Inherited from AObject.)
Update (float)
Process incoming messages from connections. Called by HandleBeginFrame.
WeakRefs () : int
Return weak reference count. (Inherited from RefCounted.)

Member Details

Network Constructor

Documentation for this section has not yet been entered.

Syntax

public Network ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Network Constructor

Construct.

Syntax

public Network (IntPtr native)

Parameters

native
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

BroadcastRemoteEvent Method

Broadcast a remote event to all client connections.

Syntax

public void BroadcastRemoteEvent (StringHash eventType, bool inOrder)

Parameters

eventType
Documentation for this section has not yet been entered.
inOrder
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

BroadcastRemoteEvent Method

Broadcast a remote event with the specified node as a sender. Is sent to all client connections in the node's scene.

Syntax

public void BroadcastRemoteEvent (Node node, StringHash eventType, bool inOrder)

Parameters

node
Documentation for this section has not yet been entered.
eventType
Documentation for this section has not yet been entered.
inOrder
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

BroadcastRemoteEvent Method

Broadcast a remote event to all client connections in a specific scene.

Syntax

public void BroadcastRemoteEvent (Scene scene, StringHash eventType, bool inOrder)

Parameters

scene
Documentation for this section has not yet been entered.
eventType
Documentation for this section has not yet been entered.
inOrder
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CheckRemoteEvent Method

Return whether a remote event is allowed to be received.

Syntax

public bool CheckRemoteEvent (StringHash eventType)

Parameters

eventType
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

ClientConnections Property

Documentation for this section has not yet been entered.

Syntax

public Vector<Connection> ClientConnections { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Connect Method

Connect to a server using UDP protocol. Return true if connection process successfully started.

Syntax

public bool Connect (string address, ushort port, Scene scene)

Parameters

address
Documentation for this section has not yet been entered.
port
Documentation for this section has not yet been entered.
scene
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

csb_Atomic_Network_GetClassIDStatic Method

Documentation for this section has not yet been entered.

Syntax

public static IntPtr csb_Atomic_Network_GetClassIDStatic ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Disconnect Method

Disconnect the connection to the server. If wait time is non-zero, will block while waiting for disconnect to finish.

Syntax

public void Disconnect (int waitMSec)

Parameters

waitMSec
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetClientConnections Method

Return all client connections.

Syntax

public Vector<Connection> GetClientConnections ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetPackageCacheDir Method

Return the package download cache directory.

Syntax

public string GetPackageCacheDir ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetServerConnection Method

Return the connection to the server. Null if not connected.

Syntax

public Connection GetServerConnection ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetServerPort Method

Documentation for this section has not yet been entered.

Syntax

public ushort GetServerPort ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetSimulatedLatency Method

Return simulated latency in milliseconds.

Syntax

public int GetSimulatedLatency ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetSimulatedPacketLoss Method

Return simulated packet loss probability.

Syntax

public float GetSimulatedPacketLoss ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

GetUpdateFps Method

Return network update FPS.

Syntax

public int GetUpdateFps ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

IsServerRunning Method

Return whether the server is running.

Syntax

public bool IsServerRunning ()

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

PackageCacheDir Property

Documentation for this section has not yet been entered.

Syntax

public string PackageCacheDir { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

PostUpdate Method

Send outgoing messages after frame logic. Called by HandleRenderUpdate.

Syntax

public void PostUpdate (float timeStep)

Parameters

timeStep
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

RegisterRemoteEvent Method

Register a remote event as allowed to be received. There is also a fixed blacklist of events that can not be allowed in any case, such as ConsoleCommand.

Syntax

public void RegisterRemoteEvent (StringHash eventType)

Parameters

eventType
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SendPackageToClients Method

Trigger all client connections in the specified scene to download a package file from the server. Can be used to download additional resource packages when clients are already joined in the scene. The package must have been added as a requirement to the scene, or else the eventual download will fail.

Syntax

public void SendPackageToClients (Scene scene, PackageFile package)

Parameters

scene
Documentation for this section has not yet been entered.
package
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

ServerConnection Property

Documentation for this section has not yet been entered.

Syntax

public Connection ServerConnection { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

ServerPort Property

Documentation for this section has not yet been entered.

Syntax

public ushort ServerPort { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

ServerRunning Property

Documentation for this section has not yet been entered.

Syntax

public bool ServerRunning { get; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SetPackageCacheDir Method

Set the package download cache directory.

Syntax

public void SetPackageCacheDir (string path)

Parameters

path
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SetSimulatedLatency Method

Set simulated latency in milliseconds. This adds a fixed delay before sending each packet.

Syntax

public void SetSimulatedLatency (int ms)

Parameters

ms
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SetSimulatedPacketLoss Method

Set simulated packet loss probability between 0.0 - 1.0.

Syntax

public void SetSimulatedPacketLoss (float probability)

Parameters

probability
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SetUpdateFps Method

Set network update FPS.

Syntax

public void SetUpdateFps (int fps)

Parameters

fps
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SimulatedLatency Property

Documentation for this section has not yet been entered.

Syntax

public int SimulatedLatency { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

SimulatedPacketLoss Property

Documentation for this section has not yet been entered.

Syntax

public float SimulatedPacketLoss { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

StartServer Method

Start a server on a port using UDP protocol. Return true if successful.

Syntax

public bool StartServer (ushort port)

Parameters

port
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

StopServer Method

Stop the server.

Syntax

public void StopServer ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

UnregisterAllRemoteEvents Method

Unregister all remote events.

Syntax

public void UnregisterAllRemoteEvents ()

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

UnregisterRemoteEvent Method

Unregister a remote event as allowed to received.

Syntax

public void UnregisterRemoteEvent (StringHash eventType)

Parameters

eventType
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Update Method

Process incoming messages from connections. Called by HandleBeginFrame.

Syntax

public void Update (float timeStep)

Parameters

timeStep
Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

UpdateFps Property

Documentation for this section has not yet been entered.

Syntax

public int UpdateFps { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0