mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
fix: rename UdpClient to UdpServer and update related documentation
BREAKING CHANGE, existing `udp` control method is now `udpServer` and `udp` control method is now a udp client
This commit is contained in:
parent
7239c827ed
commit
c0b2ed1528
3 changed files with 17 additions and 17 deletions
|
|
@ -183,12 +183,12 @@ namespace PepperDash.Core
|
||||||
Cresnet = 8,
|
Cresnet = 8,
|
||||||
Cec = 9,
|
Cec = 9,
|
||||||
Udp = 10,
|
Udp = 10,
|
||||||
UdpClient = 11,
|
UdpServer = 11,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
These enumerations are not case sensitive. Not all methods are valid for a ```genericComm``` device. For a comport, the only valid type would be ```Com```. For a direct network socket, valid options are ```Ssh```, ```Tcpip```, ```Telnet```, ```UdpClient```, and ```Udp```.
|
These enumerations are not case sensitive. Not all methods are valid for a ```genericComm``` device. For a comport, the only valid type would be ```Com```. For a direct network socket, valid options are ```Ssh```, ```Tcpip```, ```Telnet```, ```Udp```, and ```UdpServer```.
|
||||||
|
|
||||||
##### ComParams
|
##### ComParams
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ This property maps to the number of the port on the device you have mapped the r
|
||||||
|
|
||||||
##### TcpSshParams
|
##### TcpSshParams
|
||||||
|
|
||||||
A ```Ssh```, ```TcpIp```, ```UdpClient```, or ```Udp``` device requires a ```tcpSshProperties``` object to set the propeties of the socket.
|
A ```Ssh```, ```TcpIp```, ```Udp```, or ```UdpServer``` device requires a ```tcpSshProperties``` object to set the propeties of the socket.
|
||||||
|
|
||||||
```Json
|
```Json
|
||||||
{
|
{
|
||||||
|
|
@ -305,7 +305,7 @@ A ```Ssh```, ```TcpIp```, ```UdpClient```, or ```Udp``` device requires a ```tcp
|
||||||
|
|
||||||
**```address```**
|
**```address```**
|
||||||
|
|
||||||
This is the IP address, hostname, or FQDN of the resource you wish to open a socket to. Use ```UdpClient``` for outbound UDP to a remote endpoint. Use ```Udp``` when you need Essentials to bind a local UDP listener.
|
This is the IP address, hostname, or FQDN of the resource you wish to open a socket to. Use ```Udp``` for outbound UDP to a remote endpoint. Use ```UdpServer``` when you need Essentials to bind a local UDP listener.
|
||||||
|
|
||||||
**```port```**
|
**```port```**
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,13 +52,13 @@ namespace PepperDash.Core
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Cec,
|
Cec,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UDP Server
|
/// UDP client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Udp,
|
Udp,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UDP client
|
/// UDP server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
UdpClient,
|
UdpServer,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// HTTP client
|
/// HTTP client
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -92,19 +92,19 @@ namespace PepperDash.Essentials.Core
|
||||||
}
|
}
|
||||||
case eControlMethod.Udp:
|
case eControlMethod.Udp:
|
||||||
{
|
{
|
||||||
var udp = new GenericUdpServer(deviceConfig.Key + "-udp", c.Address, c.Port, c.BufferSize);
|
var udp = new GenericUdpClient(deviceConfig.Key + "-udp", c.Address, c.Port, c.BufferSize)
|
||||||
comm = udp;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case eControlMethod.UdpClient:
|
|
||||||
{
|
|
||||||
var udpClient = new GenericUdpClient(deviceConfig.Key + "-udpClient", c.Address, c.Port, c.BufferSize)
|
|
||||||
{
|
{
|
||||||
AutoReconnect = c.AutoReconnect
|
AutoReconnect = c.AutoReconnect
|
||||||
};
|
};
|
||||||
if (udpClient.AutoReconnect)
|
if (udp.AutoReconnect)
|
||||||
udpClient.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs;
|
udp.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs;
|
||||||
comm = udpClient;
|
comm = udp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case eControlMethod.UdpServer:
|
||||||
|
{
|
||||||
|
var udpServer = new GenericUdpServer(deviceConfig.Key + "-udpServer", c.Address, c.Port, c.BufferSize);
|
||||||
|
comm = udpServer;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case eControlMethod.Telnet:
|
case eControlMethod.Telnet:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue