public NamedPipeChannel(NamedPipeChannelDefinition definition, PipeProxy pipe, IDispatcher dispatcher) { Definition = definition; Name = definition.Name; Dispatcher = dispatcher; Pipe = pipe; Pipe.Connect(); }
public PipeProxy(NamedPipeChannelDefinition definition, IDispatcher dispatch, IMessageSerializer messageSerializer) { Definition = definition; Dispatcher = dispatch; Serializer = messageSerializer; PipeFactory = new PipeEndpointFactory(); Pipe = PipeFactory.CreateEndpointForChannel(definition); RingBuffer = new RingBuffer(1000); RingBuffer.AddTransform(DeserializeMessage); RingBuffer.AddTransform(DispatchResult); RingBuffer.Start(); }
public IPipeEndpoint CreateEndpointForChannel(NamedPipeChannelDefinition definition) { if ( definition.IsServer ) { var stream = new NamedPipeServerStream( definition.PipeName, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Message, PipeOptions.Asynchronous, definition.BufferSize, definition.BufferSize); return new ServerPipeEndpoint( stream ); } else { return new ClientPipeEndpoint( definition ); } }
public IPipeEndpoint CreateEndpointForChannel(NamedPipeChannelDefinition definition) { if (definition.IsServer) { var stream = new NamedPipeServerStream( definition.PipeName, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Message, PipeOptions.Asynchronous, definition.BufferSize, definition.BufferSize); return(new ServerPipeEndpoint(stream)); } else { return(new ClientPipeEndpoint(definition)); } }
public NamedPipeChannelConfigurator() { Definition = new NamedPipeChannelDefinition(); }
public ClientPipeEndpoint( NamedPipeChannelDefinition definition ) { Definition = definition; }
public PipeProxy( NamedPipeChannelDefinition definition, IDispatcher dispatch, IMessageSerializer messageSerializer ) { Definition = definition; Dispatcher = dispatch; Serializer = messageSerializer; PipeFactory = new PipeEndpointFactory(); Pipe = PipeFactory.CreateEndpointForChannel( definition ); RingBuffer = new RingBuffer( 1000 ); RingBuffer.AddTransform( DeserializeMessage ); RingBuffer.AddTransform( DispatchResult ); RingBuffer.Start(); }
public ClientPipeEndpoint(NamedPipeChannelDefinition definition) { Definition = definition; }