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:
Jonathan Arndt 2026-05-01 15:59:09 -07:00
parent 7239c827ed
commit c0b2ed1528
3 changed files with 17 additions and 17 deletions

View file

@ -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```**

View file

@ -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>

View file

@ -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: