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

An ISocketReceiver implementation for unit testing. More...

Inheritance diagram for ExitGames.Net.Sockets.Stub.StubReceiver:
ExitGames.Net.Sockets.ISocketReceiver

Public Member Functions

 StubReceiver (IPEndPoint endPoint)
 Initializes a new instance of the StubReceiver class. More...
 
 StubReceiver (IPAddress address, int port)
 Initializes a new instance of the StubReceiver class. More...
 
void Start ()
 Starts the STUB receiver. More...
 
void Dispose ()
 Closes the StubReceiver. More...
 
void ReceiveCallback (EndPoint endPoint, byte[] data)
 Call when something was received. More...
 

Properties

IPEndPoint EndPoint [get]
 Gets the IP end point. More...
 
long TotalBytesReceived [get, set]
 Gets the total number of bytes received. More...
 
- Properties inherited from ExitGames.Net.Sockets.ISocketReceiver
IPEndPoint EndPoint [get]
 Gets the remote end point. More...
 
long TotalBytesReceived [get]
 Gets the total number of resecived bytes. More...
 

Events

Action< object, Exception > Error
 This event is invoked if an unexpected exception is thrown. More...
 
EventHandler< SocketReceiveEventArgsReceive
 This event is invoked if a package is received. More...
 
- Events inherited from ExitGames.Net.Sockets.ISocketReceiver
EventHandler< SocketReceiveEventArgsReceive
 Event that is invoked when new data is received. More...
 

Detailed Description

An ISocketReceiver implementation for unit testing.

Constructor & Destructor Documentation

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

Initializes a new instance of the StubReceiver class.

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

Initializes a new instance of the StubReceiver class.

Parameters
addressThe IP address.
portThe port.

Member Function Documentation

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

Closes the StubReceiver.

void ExitGames.Net.Sockets.Stub.StubReceiver.ReceiveCallback ( EndPoint  endPoint,
byte[]  data 
)
inline

Call when something was received.

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

Starts the STUB receiver.

Property Documentation

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

Gets the IP end point.

long ExitGames.Net.Sockets.Stub.StubReceiver.TotalBytesReceived
getset

Gets the total number of bytes received.

Event Documentation

Action<object, Exception> ExitGames.Net.Sockets.Stub.StubReceiver.Error

This event is invoked if an unexpected exception is thrown.

EventHandler<SocketReceiveEventArgs> ExitGames.Net.Sockets.Stub.StubReceiver.Receive

This event is invoked if a package is received.