Exemple #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));
     }
 }
Exemple #2
0
 internal static extern int uv_tcp_bind(IntPtr handle, ref sockaddr_in6 sockaddr, uint flags);
Exemple #3
0
 internal extern static int uv_ip6_addr(string ip, int port, out sockaddr_in6 address);
Exemple #4
0
 internal static extern int uv_tcp_bind(IntPtr handle, ref sockaddr_in6 sockaddr, uint flags);
Exemple #5
0
 internal extern static int uv_ip6_addr(string ip, int port, out sockaddr_in6 address);