UDP client helper.
Class instance accessor: UdpClient
More...
|
UdpClientHelper | Sender (string address, int port) |
| Sets the client as a sender to address:port.
|
|
bool | Receiver (int port) |
| Connects to the remote using the specified port and returns true if successful, false otherwise.
|
|
UdpClientHelper | Disconnect () |
| Disconnects from the remote host.
|
|
void | SendMessage (string message) |
| Sends a string message.
|
|
void | SendMessage (byte[] message) |
| Sends a raw data message.
|
|
UdpClientHelper | OnStringReceived (Action< string > receivedAction) |
| Sets the function to call when a new string message is received.
|
|
UdpClientHelper | OnMessageReceived (Action< byte[]> receivedAction) |
| Sets the function to call when a new raw message is received.
|
|
UdpClientHelper | OnStatusChanged (Action< bool > statusChangeAction) |
| Sets the function to call when the status of the connection changes.
|
|
|
bool | IsConnected [get] |
| Gets a value indicating whether the connection to the service is estabilished.
|
|
string | EndOfLine [get, set] |
| Gets or sets the end of line delimiter used in text messaging.
|
|
UDP client helper.
Class instance accessor: UdpClient
◆ Sender()
Sets the client as a sender to address:port.
- Returns
- UdpClientHelper.
- Parameters
-
address | Remote DNS or IP address. |
port | port to send to |
◆ Receiver()
bool Receiver |
( |
int |
port | ) |
|
Connects to the remote using the specified port and returns true if successful, false otherwise.
- Returns
- bool
- Parameters
-
◆ SendMessage() [1/2]
void SendMessage |
( |
string |
message | ) |
|
Sends a string message.
- Parameters
-
◆ SendMessage() [2/2]
void SendMessage |
( |
byte[] |
message | ) |
|
Sends a raw data message.
- Parameters
-
◆ OnStringReceived()
Sets the function to call when a new string message is received.
- Parameters
-
receivedAction | Function or inline delegate. |
◆ OnMessageReceived()
Sets the function to call when a new raw message is received.
- Parameters
-
receivedAction | Function or inline delegate. |
◆ OnStatusChanged()
Sets the function to call when the status of the connection changes.
- Parameters
-
statusChangeAction | Function or inline delegate. |
◆ IsConnected
Gets a value indicating whether the connection to the service is estabilished.
true
if connected; otherwise, false
.
◆ EndOfLine
Gets or sets the end of line delimiter used in text messaging.
The end of line.
The documentation for this class was generated from the following file: