DGI.Framework.Communications.Generic.TCPClient 1.0.0-rc1

TCP Client for DGI AV Framework

Provides a lightweight client for TCP communications with servers with connection retries when connection is not successful. Connection retry interval is fast in the beginning and (500ms 3 times) to long intervals (10s after 11 times) . The timing is ideal for applications when the device might not always be online. This way the network is not task with constant TCP connection traffic.

As oppose to the Crestron TCP clients, this driver will not write in the log everytime that a connection was not successful

The driver implements ICommunications for easy interfacing with Devices Drivers.

The constructor takes a configuration file that can be created in the program, or loaded from a JSON file. Loading it from a file needs to be handled by the host application.

It relies entirely on .Net standard libraries.

Structured Logging

This driver accepts a Property of type ILogger to add Serilog as a Dependency Injection. If no property is assigned, the class will log to the Global Logger. If no Global Logger is created, no logging will take place.

This class takes advantage of Serilog's SourceContext, which will Enrich the log with the Class Name. To display it, make sure to add the SouceContext property to your message template.

Logs generated in this class are Verbose, and Debug and Warning. All exceptions have been caught.

A typical Global Logger assigned in the ControlSystem main block will look like this

Log.Logger = new LoggerConfiguration()
    .WriteTo.CrestronConsole(outputTemplate:"[{SourceContext} - {Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}" )
    .WriteTo.CrestronErrorLog(outputTemplate:"[{SourceContext} - {Level:u3}] {Message:lj}{NewLine}{Exception}")
    .CreateLogger();

Showing the top 20 packages that depend on DGI.Framework.Communications.Generic.TCPClient.

Packages Downloads
DGI.Framework.Core.RemoteDeviceFactory
Creates Remote Drivers for Remote Devices
6
DGI.Framework.Mechanical.GlobalCache.Relay
Global Cache Relay that implements IDgiRelay
3

Initial Release. Based off of the ARE Project

.NET Framework 4.7

.NET 5.0

.NET 6.0

.NET 7.0

Version Downloads Last updated
2.0.4 6 8/9/2026
2.0.3 2 6/19/2026
2.0.2 2 6/18/2026
2.0.1 37 6/11/2026
2.0.0 3 6/5/2026
1.4.0 23 2/22/2025
1.3.4 2 10/11/2024
1.3.3 2 10/6/2024
1.3.2 2 9/19/2024
1.3.1 2 9/9/2024
1.3.0 2 9/1/2024
1.2.0 4 6/28/2024
1.0.1 2 3/8/2024
1.0.0 5 12/24/2023
1.0.0-rc1 9 11/5/2023