C# Class PiE.Net.UDPSocket

UDP socket abstraction.
Afficher le fichier Open project: pioneers/forseti Class Usage Examples

Méthodes publiques

Méthode Description
AddDataReceiver ( UDPSocketDataCallback cb ) : void

Adds the data receiver, to be notified on data receive. Notified at this.notifyReceive().

Poll ( ) : void
RemoveDataReceiver ( UDPSocketDataCallback cb ) : void

Removes the data receiver, to from being notified on data receive.

Run ( ) : void

Run this instance.

Send ( byte byteData, string address ) : void
Start ( ) : void

Start this instance.

UDPSocket ( int listenPort, int sendPort ) : System

Initializes a new instance of the PiE.Net.UDPSocket class.

Private Methods

Méthode Description
NotifyReceive ( byte received, string senderAddress ) : void

Notifies listeners that a SocketServerConnection has received data. Called by ServerSocketConnections which are children of this SocketServer.

ReadCallback ( IAsyncResult ar ) : void

Reads the callback.

ReadCallbackBlocking ( byte received, IPAddress address ) : void

Method Details

AddDataReceiver() public méthode

Adds the data receiver, to be notified on data receive. Notified at this.notifyReceive().
public AddDataReceiver ( UDPSocketDataCallback cb ) : void
cb UDPSocketDataCallback /// The callback to call on data receive. ///
Résultat void

Poll() public méthode

public Poll ( ) : void
Résultat void

RemoveDataReceiver() public méthode

Removes the data receiver, to from being notified on data receive.
public RemoveDataReceiver ( UDPSocketDataCallback cb ) : void
cb UDPSocketDataCallback /// The callback to call on data receive, that was registered with this.AddDataReciever(). ///
Résultat void

Run() public méthode

Run this instance.
public Run ( ) : void
Résultat void

Send() public méthode

public Send ( byte byteData, string address ) : void
byteData byte
address string
Résultat void

Start() public méthode

Start this instance.
public Start ( ) : void
Résultat void

UDPSocket() public méthode

Initializes a new instance of the PiE.Net.UDPSocket class.
public UDPSocket ( int listenPort, int sendPort ) : System
listenPort int
sendPort int
Résultat System