Ejemplo n.º 1
0
        public static SocketPair CreatePair(int domain, int type, int protocol, bool blocking)
        {
            int socket1;
            int socket2;
            var result = SocketInterop.SocketPair(domain, type, protocol, blocking, out socket1, out socket2);

            return(new SocketPair {
                Socket1 = socket1, Socket2 = socket2
            });
        }
Ejemplo n.º 2
0
        public static SocketPair CreatePair(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType, bool blocking)
        {
            int socket1;
            int socket2;
            var result = SocketInterop.SocketPair(addressFamily, socketType, protocolType, blocking, out socket1, out socket2);

            return(new SocketPair {
                Socket1 = socket1, Socket2 = socket2
            });
        }