using System; using System.Collections.Generic; using System.Text; using System.Net.Sockets; namespace PlantBox.Shared.Communication { /// /// Contains all informations used to communicate /// public static class Connection { // UDP /// /// Port used by broadcast discovery /// public const int UDP_PORT = 1401; /// /// Request sent for a discovery /// public static readonly byte[] UDP_REQUEST = { 102, 210, 48, 255 }; /// /// Reply sent for a discovery /// public static readonly byte[] UDP_REPLY = { 102, 210, 48, 0 }; // TCP /// /// Port used by the broker to accept servers /// public const int TCP_SERVER_PORT = 1402; /// /// Port used by the broker to accept clients /// public const int TCP_CLIENT_PORT = 1403; /// /// Bytes to read at a time in a /// public const int BUFFER_SIZE = 4096; } }