ServerClient

Namespace: TagBites.Net
Assembly: TagBites.Net.dll

TCP server client which allows to send objects messages and execute remote methods. This class is thread safe.

public class ServerClient : TagBites.Net.NetworkClient

Properties

Identity

Gets client identity specified during authorization.

public object Identity { get; }

Result Type: object

RemoteEndPoint

Gets the remote endpoint.

public EndPoint RemoteEndPoint { get; }

Result Type: EndPoint

Server

Get server instance that established a connection with this client. A null value when server was disposed.

public Server Server { get; }

Result Type: Server

Methods

OnConnectionClosed(object, NetworkConnectionClosedEventArgs)

protected void OnConnectionClosed(object sender, NetworkConnectionClosedEventArgs e)

Result Type: void

Parameters

TypeName
objectsender
NetworkConnectionClosedEventArgse

OnControllerResolve(object, NetworkConnectionControllerResolveEventArgs)

protected void OnControllerResolve(object sender, NetworkConnectionControllerResolveEventArgs e)

Result Type: void

Parameters

TypeName
objectsender
NetworkConnectionControllerResolveEventArgse

OnReceived(object, NetworkConnectionMessageEventArgs)

protected void OnReceived(object sender, NetworkConnectionMessageEventArgs e)

Result Type: void

Parameters

TypeName
objectsender
NetworkConnectionMessageEventArgse

OnReceivedError(object, NetworkConnectionMessageErrorEventArgs)

protected void OnReceivedError(object sender, NetworkConnectionMessageErrorEventArgs e)

Result Type: void

Parameters

TypeName
objectsender
NetworkConnectionMessageErrorEventArgse

ToString()

public string ToString()

Result Type: string

Use<TControllerInterface, TController>()

Register local controller.

public void Use()

Result Type: void

Use<TControllerInterface, TController>(TController)

Register local controller.

public void Use(TController controller)

Result Type: void

Parameters

TypeName
TControllercontrollerController instance.