C# 클래스 Snarf.Udp.UdpListener

A basic listener that listens for incoming UDP messages on the specified port and passes the event on to application code whenever a message is received.
상속: IDisposable
파일 보기 프로젝트 열기: shellscape/Snarf 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
localMessagesOnly bool
port int
udp System.Net.Sockets.UdpClient

공개 메소드들

메소드 설명
Dispose ( ) : void
GetLocalSubnetMask ( IPAddress ipaddress ) : IPAddress
GetNetworkAddress ( IPAddress address, IPAddress subnetMask ) : IPAddress
IsInSameSubnet ( IPAddress localAddress, IPAddress otherAddress ) : bool
Start ( ) : void
Start ( AsyncCallback callback ) : void

Starts listening for messages on the specified port

Stop ( ) : void

Stops listening for messages and frees the port

UdpListener ( int port, bool localMessagesOnly ) : System

Creates a new UdpListener

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
ProcessPacket ( IAsyncResult ar ) : void

When a message is received by the listener, the raw data is read from the packet and the PacketReceived event is fired.

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

GetLocalSubnetMask() 공개 정적인 메소드

public static GetLocalSubnetMask ( IPAddress ipaddress ) : IPAddress
ipaddress System.Net.IPAddress
리턴 System.Net.IPAddress

GetNetworkAddress() 공개 정적인 메소드

public static GetNetworkAddress ( IPAddress address, IPAddress subnetMask ) : IPAddress
address System.Net.IPAddress
subnetMask System.Net.IPAddress
리턴 System.Net.IPAddress

IsInSameSubnet() 공개 정적인 메소드

public static IsInSameSubnet ( IPAddress localAddress, IPAddress otherAddress ) : bool
localAddress System.Net.IPAddress
otherAddress System.Net.IPAddress
리턴 bool

Start() 공개 메소드

public Start ( ) : void
리턴 void

Start() 공개 메소드

Starts listening for messages on the specified port
public Start ( AsyncCallback callback ) : void
callback AsyncCallback
리턴 void

Stop() 공개 메소드

Stops listening for messages and frees the port
public Stop ( ) : void
리턴 void

UdpListener() 공개 메소드

Creates a new UdpListener
public UdpListener ( int port, bool localMessagesOnly ) : System
port int The port to listen for messages on
localMessagesOnly bool true to only listen for messages from the local machine;false to listen for messages from any source
리턴 System

프로퍼티 상세

localMessagesOnly 보호되어 있는 프로퍼티

Indicates if messages from remote machines should be allowed or not
protected bool localMessagesOnly
리턴 bool

port 보호되어 있는 프로퍼티

The port to listen for messages on
protected int port
리턴 int

udp 보호되어 있는 프로퍼티

The underlying UdpClient
protected UdpClient,System.Net.Sockets udp
리턴 System.Net.Sockets.UdpClient