DGI.Framework.Communications.Generic.UdpClient 1.2.0
UDP Client for DGI AV Framework
Provides a UDP Client capable of listening and sending UDP messages. It is designed to be used with the DGI AV Framework, but can be used in any .Net application. It features the ability to retry the server connection if it is not successful. The retry interval is fast in the beginning and slows down after consecutive attempts. The timing is ideal for applications when the device might not always be online. This way the network is not tasked with constant TCP connection traffic.
Under normal operation, the driver will listen in the same port as the remote device. Bear in mind that this is not normal operation, but it is done that way to mimic the Crestron UDP Communication module. Normally a random port (and Ephemeral port) is created when starting a communication to a remote device that will respond to incoming messages. The issue being that sometimes AV devices are sending unrequested information and therefore will not know what port to send it in.
It is possible to configure this driver to use the ephemeral port instead by setting the UseRandomReceivePort property to true.
This driver will not write in the log every time a connection is not successful unless the log level is set to Debug. This is to avoid flooding the log with unnecessary messages.
The driver implements ICommunications for easy interfacing with other Devices Drivers in the DGI AV Framework.
The constructor takes a configuration class to configure the connection. This can be leveraged by the Host Application to create the configuration file from a JSON file stored in the device and boot up.
It relies entirely on .Net standard libraries which makes it possible to be used in windows, mac and linux applications.
Version 1.1.x supports Hostname resolution through mDNS, ideal for Shure microphones that don't announce their
hostnames to the DHCP server.
Version 1.2.0 removed mDNS support due to long compile times when used as a SIMPL library. If mDNS resolution is needed in SIMPL a separate library has been created for that purpose.
Notes
A sample program that runs on a Crestron Appliance is included to test integration. This library can be used standalone, but it is normally part of the larger DGI Architecture.
Changing any IP Address or Hostname while the connection is established will trigger a reconnection attempt.
Hostname resolution will be attempted through DNS first, and if it fails, it will attempt to resolve through mDNS.
VC-4 Notes
Under CentOs, the mDNS ports are closed by default. For your program to resolve mDNS commands the following must be done:
sudo firewall-cmd --permanent --zone=public --add-port=5353/udp
sudo firewall-cmd --reload
Full Documentation
For more information on how to use this driver, please refer to the Full Documentation
Showing the top 20 packages that depend on DGI.Framework.Communications.Generic.UdpClient.
| Packages | Downloads |
|---|---|
|
DGI.Framework.Core.RemoteDeviceFactory
Creates Remote Drivers for Remote Devices
|
6 |
.NET Framework 4.7
- DGI.Framework.Core (>= 1.1.0)
- DGI.ResolveHostnameDriver (>= 1.1.0)
.NET 6.0
- DGI.Framework.Core (>= 1.1.0)
- DGI.ResolveHostnameDriver (>= 1.1.0)
.NET 7.0
- DGI.Framework.Core (>= 1.1.0)
- DGI.ResolveHostnameDriver (>= 1.1.0)