Ejemplo n.º 1
0
        public override void Setup(ConnectionEndpoint endpoint)
        {
            this.EndPoint = endpoint;
            this.Client   = new UdpClient();
            // TODO: Solve for .NET Standard, this is possibly default behaviour (???)
#if HAS_NAT_TRAVERSAL
            this.Client.AllowNatTraversal(true);
#endif
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Configures the UDP client.
        /// </summary>
        /// <param name="endpoint">Endpoint that the client will be communicating with.</param>
        public override void Setup(ConnectionEndpoint endpoint)
        {
            EndPoint = endpoint;
            Client   = new UdpClient();
            // TODO: Solve for .NET Standard, this is possibly default behaviour (???)
#if !WINDOWS_UWP
            Client.AllowNatTraversal(true);
#endif
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Configures the UDP client.
 /// </summary>
 /// <param name="endpoint">Endpoint that the client will be communicating with.</param>
 public override void Setup(ConnectionEndpoint endpoint)
 {
     this.EndPoint     = endpoint;
     this.Client       = new UdpClient();
     this.ReceiverTask = Task.Run(this.ReceiverLoopAsync, this.Token);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Configures the UDP client.
 /// </summary>
 /// <param name="endpoint">Endpoint that the client will be communicating with.</param>
 public abstract void Setup(ConnectionEndpoint endpoint);
Ejemplo n.º 5
0
 /// <summary>
 /// Configures the UDP client.
 /// </summary>
 /// <param name="endpoint">Endpoint that the client will be communicating with.</param>
 public override void Setup(ConnectionEndpoint endpoint)
 {
     throw new PlatformNotSupportedException(".NET UDP client is not supported on this platform. You need to target .NETFX, .NET Standard 1.3, or provide a WebSocket implementation for this platform.");
 }