public static void CreatePair(Socket connectSocket, Socket bindSocket, int connetHighWatermark, int bindHighwatermark, out Pipe connectPipe, out Pipe bindPipe) { // Creates two pipe objects. These objects are connected by two ypipes, // each to pass messages in one direction. YPipe<Frame> upipe1 = new YPipe<Frame>(); YPipe<Frame> upipe2 = new YPipe<Frame>(); connectPipe = new Pipe(connectSocket, upipe1, upipe2, connetHighWatermark, bindHighwatermark); bindPipe = new Pipe(bindSocket, upipe2, upipe1, bindHighwatermark, connetHighWatermark); connectPipe.SetPeer(bindPipe); bindPipe.SetPeer(connectPipe); }