Class UdpReceiver
Represents the receiver of messages transfered via UDP protocol.
Представляет получателя сообщений по протоколу UDP.
Namespace: Platform.Protocols.Udp
Assembly: Platform.Protocols.dll
Syntax
public class UdpReceiver : DisposableBase
Constructors
| Improve this Doc View SourceUdpReceiver()
Initializes a new UdpReceiver instance.
Declaration
public UdpReceiver()
UdpReceiver(MessageHandlerCallback)
Initializes a new UdpReceiver instance.
Declaration
public UdpReceiver(MessageHandlerCallback messageHandler)
Parameters
Type | Name | Description |
---|---|---|
MessageHandlerCallback | messageHandler | A message handler.
|
UdpReceiver(Int32, MessageHandlerCallback)
Initializes a new UdpReceiver instance.
Declaration
public UdpReceiver(int listenPort, MessageHandlerCallback messageHandler)
Parameters
Type | Name | Description |
---|---|---|
Int32 | listenPort | A listen port.
|
MessageHandlerCallback | messageHandler | A message handler.
|
UdpReceiver(Int32, Boolean, MessageHandlerCallback)
Initializes a new UdpReceiver instance.
Declaration
public UdpReceiver(int listenPort, bool autoStart, MessageHandlerCallback messageHandler)
Parameters
Type | Name | Description |
---|---|---|
Int32 | listenPort | A listen port.
|
Boolean | autoStart | A auto start.
|
MessageHandlerCallback | messageHandler | A message handler.
|
Properties
| Improve this Doc View SourceAvailable
Gets the available value.
Declaration
public bool Available { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceDispose(Boolean, Boolean)
Disposes the manual.
Declaration
protected override void Dispose(bool manual, bool wasDisposed)
Parameters
Type | Name | Description |
---|---|---|
Boolean | manual | The manual.
|
Boolean | wasDisposed | The was disposed.
|
Receive()
Receives this instance.
Declaration
public string Receive()
Returns
Type | Description |
---|---|
String | The string
|
ReceiveAndHandle()
Receives the and handle.
Declaration
public void ReceiveAndHandle()
Start()
Starts this instance.
Declaration
public void Start()
Stop()
Stops this instance.
Declaration
public void Stop()