Ejemplo n.º 1
0
 static void Bind(TcpListener listener, string ipAddress, int port, bool ip6 = false, bool dualstack = false)
 {
     if (ip6)
     {
         sockaddr_in6 address = CreateSockaddrIp6(ipAddress.ToString(), port);
         UVException.ThrowIfError(UVInterop.uv_tcp_bind(listener.Handle, ref address, (uint)(dualstack ? 0 : 1)));
     }
     else
     {
         sockaddr_in address = CreateSockaddr(ipAddress.ToString(), port);
         UVException.ThrowIfError(UVInterop.uv_tcp_bind(listener.Handle, ref address, 0));
     }
 }
Ejemplo n.º 2
0
 internal static extern int uv_tcp_bind(IntPtr handle, ref sockaddr_in6 sockaddr, uint flags);
Ejemplo n.º 3
0
 internal extern static int uv_ip6_addr(string ip, int port, out sockaddr_in6 address);
Ejemplo n.º 4
0
 internal static extern int uv_tcp_bind(IntPtr handle, ref sockaddr_in6 sockaddr, uint flags);
Ejemplo n.º 5
0
 internal extern static int uv_ip6_addr(string ip, int port, out sockaddr_in6 address);