Ejemplo n.º 1
0
        private NamedPipeServerStream CreateRecievingPipeServer(Stream client)
        {
            var receivingPipe = Guid.NewGuid().ToString();
            var messageStream = new MessageStream(client);

            messageStream.WriteMessage(receivingPipe);

            return(this.pipeSecurity != null
                ? new NamedPipeServerStream(receivingPipe, PipeDirection.In, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Message, PipeOptions.Asynchronous, 0, 0, this.pipeSecurity)
                : new NamedPipeServerStream(receivingPipe, PipeDirection.In, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Message, PipeOptions.Asynchronous));
        }