Photon Server API
Public Member Functions | Public Attributes | Properties | List of all members
ExitGames.Net.Sockets.Stub.StubSender Class Reference

An ISocketSender implementation for unit testing. More...

Inheritance diagram for ExitGames.Net.Sockets.Stub.StubSender:
ExitGames.Net.Sockets.ISocketSender

Public Member Functions

 StubSender (IPEndPoint endPoint)
 Initializes a new instance of the StubSender class. More...
 
 StubSender (IPAddress address, int port)
 Initializes a new instance of the StubSender class. More...
 
void Start ()
 Connects to the EndPoint. More...
 
void Dispose ()
 Disposes all managed and unmanaged resources. More...
 
void Send (byte[] data)
 Sends a byte array. More...
 
void Send (byte[] data, int offset, int length)
 Sends a byte array. More...
 
void Send (IList< ArraySegment< byte >> data)
 Sends a list of ArraySegment<T> of byte. More...
 

Public Attributes

readonly List< byte[]> Sent = new List<byte[]>()
 

Properties

bool Connected [get, set]
 Gets a value indicating whether the ISocketSender is connected to a remote host as of the last Send operation. More...
 
IPEndPoint EndPoint [get]
 Gets the endpoint address to which the underling socket is associated. More...
 
long TotalBytesSent [get, set]
 Gets the number of bytes sent by this instance. More...
 
- Properties inherited from ExitGames.Net.Sockets.ISocketSender
bool Connected [get]
 Gets a value indicating whether the ISocketSender is connected to a remote host as of the last Send operation. More...
 
IPEndPoint EndPoint [get]
 Gets the remote end point. More...
 
long TotalBytesSent [get]
 Gets the total number of sent bytes. More...
 

Detailed Description

An ISocketSender implementation for unit testing.

Constructor & Destructor Documentation

ExitGames.Net.Sockets.Stub.StubSender.StubSender ( IPEndPoint  endPoint)
inline

Initializes a new instance of the StubSender class.

Parameters
endPointThe end point.
ExitGames.Net.Sockets.Stub.StubSender.StubSender ( IPAddress  address,
int  port 
)
inline

Initializes a new instance of the StubSender class.

Parameters
addressThe IP address.
portThe port.

Member Function Documentation

void ExitGames.Net.Sockets.Stub.StubSender.Dispose ( )
inline

Disposes all managed and unmanaged resources.

void ExitGames.Net.Sockets.Stub.StubSender.Send ( byte[]  data)
inline

Sends a byte array.

Parameters
dataThe data.

Implements ExitGames.Net.Sockets.ISocketSender.

void ExitGames.Net.Sockets.Stub.StubSender.Send ( byte[]  data,
int  offset,
int  length 
)
inline

Sends a byte array.

Parameters
dataThe data.
offsetThe offset.
lengthThe length.

Implements ExitGames.Net.Sockets.ISocketSender.

void ExitGames.Net.Sockets.Stub.StubSender.Send ( IList< ArraySegment< byte >>  data)
inline

Sends a list of ArraySegment<T> of byte.

Parameters
dataThe data.

Implements ExitGames.Net.Sockets.ISocketSender.

void ExitGames.Net.Sockets.Stub.StubSender.Start ( )
inline

Connects to the EndPoint.

Member Data Documentation

readonly List<byte[]> ExitGames.Net.Sockets.Stub.StubSender.Sent = new List<byte[]>()

Property Documentation

bool ExitGames.Net.Sockets.Stub.StubSender.Connected
getset

Gets a value indicating whether the ISocketSender is connected to a remote host as of the last Send operation.

IPEndPoint ExitGames.Net.Sockets.Stub.StubSender.EndPoint
get

Gets the endpoint address to which the underling socket is associated.

long ExitGames.Net.Sockets.Stub.StubSender.TotalBytesSent
getset

Gets the number of bytes sent by this instance.