Photon Server API
Public Member Functions | Static Public Attributes | Properties | List of all members
ExitGames.Net.Sockets.Pgm.PgmSender Class Reference

Provides methods to send data using the Pragmatic General Multicast (PGM) protocol. More...

Inheritance diagram for ExitGames.Net.Sockets.Pgm.PgmSender:
ExitGames.Net.Sockets.ISocketSender

Public Member Functions

 PgmSender (IPEndPoint endPoint)
 Initializes a new instance of the PgmSender class. More...
 
 PgmSender (IPAddress address, int port)
 Initializes a new instance of the PgmSender class. More...
 
 PgmSender (string address, int port)
 Initializes a new instance of the PgmSender class. More...
 
void Close ()
 Closes the Socket. More...
 
void Connect ()
 Connects the PgmSender socket. More...
 
void Connect (string sendInterface)
 Connects the PgmSender socket. More...
 
void Connect (string sendInterface, int?sendBufferSize, PgmSendWindowSize?windowSize)
 Connects the PgmSender socket. Any pre-existing connection is closed. More...
 
void Dispose ()
 Releases the resources used by the PgmSender. More...
 
void Send (byte[] data)
 Sends data to a connected Socket. More...
 
void Send (byte[] data, int offset, int length)
 Sends data to a connected Socket. More...
 
void Send (IList< ArraySegment< byte >> data)
 Sends a set of buffers in the list to a connected Socket. More...
 

Static Public Attributes

static readonly uint DefaultRateKbitsPerSec
 The default rate kbits per sec. More...
 
static readonly uint DefaultWindowSizeInBytes
 The default window size in bytes. More...
 
static readonly uint DefaultWindowSizeInMSecs
 The default window size in m secs. More...
 

Properties

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 multicast end point. More...
 
long TotalBytesSent [get, set]
 Gets or sets the total number of sent bytes. 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

Provides methods to send data using the Pragmatic General Multicast (PGM) protocol.

Constructor & Destructor Documentation

ExitGames.Net.Sockets.Pgm.PgmSender.PgmSender ( IPEndPoint  endPoint)
inline

Initializes a new instance of the PgmSender class.

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

Initializes a new instance of the PgmSender class.

Parameters
addressThe ip address to which the underling socket will be connected.
portThe port to which the underling socket will be connected.
ExitGames.Net.Sockets.Pgm.PgmSender.PgmSender ( string  address,
int  port 
)
inline

Initializes a new instance of the PgmSender class.

Parameters
addressThe ip address to which the underling socket will be connected.
portThe port to which the underling socket will be connected.

Member Function Documentation

void ExitGames.Net.Sockets.Pgm.PgmSender.Close ( )
inline

Closes the Socket.

void ExitGames.Net.Sockets.Pgm.PgmSender.Connect ( )
inline

Connects the PgmSender socket.

Exceptions
System.Net.Sockets.SocketExceptionException thrown by the underlying Socket.
void ExitGames.Net.Sockets.Pgm.PgmSender.Connect ( string  sendInterface)
inline

Connects the PgmSender socket.

Parameters
sendInterfaceThe send Interface.
Exceptions
System.Net.Sockets.SocketExceptionException thrown by the underlying Socket.
void ExitGames.Net.Sockets.Pgm.PgmSender.Connect ( string  sendInterface,
int?  sendBufferSize,
PgmSendWindowSize windowSize 
)
inline

Connects the PgmSender socket. Any pre-existing connection is closed.

Parameters
sendInterfaceThe send Interface.
sendBufferSizeThe send Buffer Size.
windowSizeThe window Size.
Exceptions
System.Net.Sockets.SocketExceptionException thrown by the underlying Socket.
void ExitGames.Net.Sockets.Pgm.PgmSender.Dispose ( )
inline

Releases the resources used by the PgmSender.

void ExitGames.Net.Sockets.Pgm.PgmSender.Send ( byte[]  data)
inline

Sends data to a connected Socket.

Parameters
dataAn array of type Byte that contains the data to be sent.

Implements ExitGames.Net.Sockets.ISocketSender.

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

Sends data to a connected Socket.

Parameters
dataAn array of type Byte that contains the data to be sent.
offsetThe position in the data buffer at which to begin sending data.
lengthThe number of bytes to send.

Implements ExitGames.Net.Sockets.ISocketSender.

void ExitGames.Net.Sockets.Pgm.PgmSender.Send ( IList< ArraySegment< byte >>  data)
inline

Sends a set of buffers in the list to a connected Socket.

Parameters
dataA list of ArraySegments of type Byte that contains the data to be sent.

Implements ExitGames.Net.Sockets.ISocketSender.

Member Data Documentation

readonly uint ExitGames.Net.Sockets.Pgm.PgmSender.DefaultRateKbitsPerSec
static

The default rate kbits per sec.

100 Mbit

readonly uint ExitGames.Net.Sockets.Pgm.PgmSender.DefaultWindowSizeInBytes
static

The default window size in bytes.

5 seconds

readonly uint ExitGames.Net.Sockets.Pgm.PgmSender.DefaultWindowSizeInMSecs
static

The default window size in m secs.

Property Documentation

bool ExitGames.Net.Sockets.Pgm.PgmSender.Connected
get

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

IPEndPoint ExitGames.Net.Sockets.Pgm.PgmSender.EndPoint
get

Gets the multicast end point.

The multicast end point.

long ExitGames.Net.Sockets.Pgm.PgmSender.TotalBytesSent
getset

Gets or sets the total number of sent bytes.

The total number of sent bytes.