diff --git a/docs/docs/usage/GenericComm.md b/docs/docs/usage/GenericComm.md index 1c1642a8..a05818de 100644 --- a/docs/docs/usage/GenericComm.md +++ b/docs/docs/usage/GenericComm.md @@ -183,12 +183,12 @@ namespace PepperDash.Core Cresnet = 8, Cec = 9, 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 @@ -288,7 +288,7 @@ This property maps to the number of the port on the device you have mapped the r ##### 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 { @@ -305,7 +305,7 @@ A ```Ssh```, ```TcpIp```, ```UdpClient```, or ```Udp``` device requires a ```tcp **```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```** diff --git a/src/PepperDash.Core/Comm/eControlMethods.cs b/src/PepperDash.Core/Comm/eControlMethods.cs index 006bb987..65ae03fa 100644 --- a/src/PepperDash.Core/Comm/eControlMethods.cs +++ b/src/PepperDash.Core/Comm/eControlMethods.cs @@ -52,13 +52,13 @@ namespace PepperDash.Core /// Cec, /// - /// UDP Server + /// UDP client /// Udp, /// - /// UDP client + /// UDP server /// - UdpClient, + UdpServer, /// /// HTTP client /// diff --git a/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs b/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs index b28331a0..f2c3fb0a 100644 --- a/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs +++ b/src/PepperDash.Essentials.Core/Comm and IR/CommFactory.cs @@ -92,19 +92,19 @@ namespace PepperDash.Essentials.Core } case eControlMethod.Udp: { - var udp = new GenericUdpServer(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) + var udp = new GenericUdpClient(deviceConfig.Key + "-udp", c.Address, c.Port, c.BufferSize) { AutoReconnect = c.AutoReconnect }; - if (udpClient.AutoReconnect) - udpClient.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs; - comm = udpClient; + if (udp.AutoReconnect) + udp.AutoReconnectIntervalMs = c.AutoReconnectIntervalMs; + comm = udp; + break; + } + case eControlMethod.UdpServer: + { + var udpServer = new GenericUdpServer(deviceConfig.Key + "-udpServer", c.Address, c.Port, c.BufferSize); + comm = udpServer; break; } case eControlMethod.Telnet: