Example #1
0
 public NamedPipeChannel(NamedPipeChannelDefinition definition, PipeProxy pipe, IDispatcher dispatcher)
 {
     Definition = definition;
     Name       = definition.Name;
     Dispatcher = dispatcher;
     Pipe       = pipe;
     Pipe.Connect();
 }
Example #2
0
        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();
        }
Example #3
0
        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();
 }
Example #6
0
 public ClientPipeEndpoint( NamedPipeChannelDefinition definition )
 {
     Definition = definition;
 }
 public NamedPipeChannelConfigurator()
 {
     Definition = new NamedPipeChannelDefinition();
 }
Example #8
0
 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();
 }
Example #9
0
 public ClientPipeEndpoint(NamedPipeChannelDefinition definition)
 {
     Definition = definition;
 }