Stormancer.Core.IConnection Interface Reference

Inherited by Stormancer.Networking.RakNetConnection, and Stormancer.RelayConnection.

Public Member Functions

void SendSystem (Action< Stream > writer, int channelUid, PacketPriority priority=PacketPriority.MEDIUM_PRIORITY, PacketReliability reliability=PacketReliability.RELIABLE_ORDERED, TransformMetadata transformMetadata=new TransformMetadata())
 Sends a system msg to the remote peer. More...
 
void SetApplication (string account, string application)
 Set the account id and the application name. More...
 
void Close (string reason="")
 Close the connection. More...
 
IConnectionStatistics GetConnectionStatistics ()
 
Task UpdatePeerMetadata ()
 
Task UpdatePeerMetadata (CancellationToken token)
 
ConnectionStateCtx GetConnectionState ()
 
void SetConnectionState (ConnectionStateCtx connectionState)
 
IObservable< ConnectionStateCtxGetConnectionStateChangedObservable ()
 
Task SetTimeout (TimeSpan timeout)
 
Task SetTimeout (TimeSpan timeout, CancellationToken token)
 
string ToString ()
 

Properties

string IpAddress [get]
 Ip address of the remote peer. More...
 
int Ping [get]
 The connection's Ping in milliseconds. More...
 
string Key [get]
 
IDependencyResolver DependencyResolver [get]
 
ulong Id [get]
 Unique id in the node for the connection. More...
 
DateTime ConnectionDate [get]
 Returns the connection date. More...
 
string Account [get]
 Account of the application which the peer is connected to. More...
 
string Application [get]
 Name of the application to which the peer is connected. More...
 
Dictionary< string, string > Metadata [get, set]
 Metadata associated with the connection. More...
 
Action< string > OnClose [get, set]
 Event fired when the connection has been closed. More...
 

Member Function Documentation

◆ Close()

void Stormancer.Core.IConnection.Close ( string  reason = "")

Close the connection.

Parameters
reasonThe reason of the connection closing.

Implemented in Stormancer.RelayConnection.

◆ SendSystem()

void Stormancer.Core.IConnection.SendSystem ( Action< Stream >  writer,
int  channelUid,
PacketPriority  priority = PacketPriority.MEDIUM_PRIORITY,
PacketReliability  reliability = PacketReliability.RELIABLE_ORDERED,
TransformMetadata  transformMetadata = new TransformMetadata() 
)

Sends a system msg to the remote peer.

Parameters
writerA function to write in the stream.
priorityThe priority of the message.
reliabilityThe reliability of the message.

Implemented in Stormancer.RelayConnection.

◆ SetApplication()

void Stormancer.Core.IConnection.SetApplication ( string  account,
string  application 
)

Set the account id and the application name.

Parameters
accountThe account id.
applicationThe application name.

Implemented in Stormancer.RelayConnection.

Property Documentation

◆ Account

string Stormancer.Core.IConnection.Account
get

Account of the application which the peer is connected to.

◆ Application

string Stormancer.Core.IConnection.Application
get

Name of the application to which the peer is connected.

◆ ConnectionDate

DateTime Stormancer.Core.IConnection.ConnectionDate
get

Returns the connection date.

◆ Id

ulong Stormancer.Core.IConnection.Id
get

Unique id in the node for the connection.

◆ IpAddress

string Stormancer.Core.IConnection.IpAddress
get

Ip address of the remote peer.

◆ Metadata

Dictionary<string, string> Stormancer.Core.IConnection.Metadata
getset

Metadata associated with the connection.

◆ OnClose

Action<string> Stormancer.Core.IConnection.OnClose
getset

Event fired when the connection has been closed.

◆ Ping

int Stormancer.Core.IConnection.Ping
get

The connection's Ping in milliseconds.


The documentation for this interface was generated from the following file:
  • Stormancer.Core/IConnection.cs