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