C# Class Sharpex2D.Network.Protocols.Udp.UdpClient

Inheritance: IClient, IDisposable
Datei anzeigen Open project: ThuCommix/Sharpex2D

Public Methods

Method Description
BeginReceive ( ) : void

Receives a package.

Connect ( IPAddress ip ) : void

Connects to the local server.

Disconnect ( ) : void

Disconnect from the local server.

Dispose ( ) : void

Disposes the object.

Send ( IBasePackage package ) : void

Sends a package to the given receivers.

Send ( IBasePackage package, IPAddress receiver ) : void

Sends a package to the given receivers.

Subscribe ( IClientListener subscriber ) : void

Subscribes to a Client.

Subscribe ( IPackageListener subscriber ) : void

Subscribes to a Client.

UdpClient ( ) : System

Initializes a new UdpClient class.

Unsubscribe ( IClientListener unsubscriber ) : void

Unsubscribes from a Client.

Unsubscribe ( IPackageListener unsubscriber ) : void

Unsubscribes from a Client.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes the object.

Private Methods

Method Description
GetPackageSubscriber ( Type type ) : IEnumerable

Gets a list of all matching package listeners.

Idle ( ) : void

Idles the thread.

InternalBeginReceive ( ) : void

Receives data.

Method Details

BeginReceive() public method

Receives a package.
public BeginReceive ( ) : void
return void

Connect() public method

Connects to the local server.
public Connect ( IPAddress ip ) : void
ip System.Net.IPAddress The Serverip.
return void

Disconnect() public method

Disconnect from the local server.
public Disconnect ( ) : void
return void

Dispose() public method

Disposes the object.
public Dispose ( ) : void
return void

Dispose() protected method

Disposes the object.
protected Dispose ( bool disposing ) : void
disposing bool Indicates whether managed resources should be disposed.
return void

Send() public method

Sends a package to the given receivers.
public Send ( IBasePackage package ) : void
package IBasePackage The Package.
return void

Send() public method

Sends a package to the given receivers.
public Send ( IBasePackage package, IPAddress receiver ) : void
package IBasePackage The Package.
receiver System.Net.IPAddress The Receiver.
return void

Subscribe() public method

Subscribes to a Client.
public Subscribe ( IClientListener subscriber ) : void
subscriber IClientListener The Subscriber.
return void

Subscribe() public method

Subscribes to a Client.
public Subscribe ( IPackageListener subscriber ) : void
subscriber IPackageListener The Subscriber.
return void

UdpClient() public method

Initializes a new UdpClient class.
public UdpClient ( ) : System
return System

Unsubscribe() public method

Unsubscribes from a Client.
public Unsubscribe ( IClientListener unsubscriber ) : void
unsubscriber IClientListener The Unsubscriber.
return void

Unsubscribe() public method

Unsubscribes from a Client.
public Unsubscribe ( IPackageListener unsubscriber ) : void
unsubscriber IPackageListener The Unsubscriber.
return void