Creates a pair of connected sockets.
The two sockets are indistinguishable.
SocketException if creation of the sockets fails.
immutable ubyte[4] data = [1, 2, 3, 4]; auto pair = socketPair(); scope(exit) foreach (s; pair) s.close(); pair[0].send(data[]); auto buf = new ubyte[data.length]; pair[1].receive(buf); assert(buf == data);
See Implementation
Creates a pair of connected sockets.
The two sockets are indistinguishable.