Esempio 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);
        }
Esempio 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;
        }
Esempio n. 3
0
 public MessageProcessor(MessageTransceiver transceiver, MessageProcessorRegistry registry)
 {
     this.transceiver = transceiver;
     this.registry    = registry;
 }