Exemplo n.º 1
0
        public MessageHost(TcpClient client, MessageProcessorRegistry registry)
        {
            this.Tcp = client;

            isConnected     = true;
            handshakeResult = new TaskCompletionSource <bool>();

            Transceiver = new MessageTransceiver(registry)
            {
                Context = this,
            };

            Transceiver.ThreadException += Transceiver_OnThreadException;
            Transceiver.Start(client);
        }
Exemplo n.º 2
0
        public MessageClient(MessageProcessorRegistry registry)
        {
            Tcp = new TcpClient {
                NoDelay             = true,
                ExclusiveAddressUse = false,
                Client =
                {
                    NoDelay             = true,
                    ExclusiveAddressUse = false
                },
            };

            Transceiver = new MessageTransceiver(registry)
            {
                Context = this,
            };

            Transceiver.ThreadException += Transceiver_OnThreadException;
        }
Exemplo n.º 3
0
 public MessageProcessor(MessageTransceiver transceiver, MessageProcessorRegistry registry)
 {
     this.transceiver = transceiver;
     this.registry    = registry;
 }