コード例 #1
0
    public static IDuplexPipe AsDuplexPipe(
        this Socket socket,
        SocketPipeReaderOptions?readerOptions = null,
        SocketPipeWriterOptions?writerOptions = null)
    {
        PipeReader reader = socket.AsPipeReader(readerOptions);
        PipeWriter writer = socket.AsPipeWriter(writerOptions);

        return(DefaultDuplexPipe.Create(reader, writer));
    }