コード例 #1
0
 public PrivateChannel(PrivateStream stream, EndpointIdentifier identifier, MqttConfiguration configuration)
 {
     _stream             = stream;
     _identifier         = identifier;
     _receiver           = new ReplaySubject <byte[]>(window: TimeSpan.FromSeconds(configuration.WaitTimeoutSecs));
     _sender             = new ReplaySubject <byte[]>(window: TimeSpan.FromSeconds(configuration.WaitTimeoutSecs));
     _streamSubscription = SubscribeStream();
 }
コード例 #2
0
        public Task <IMqttChannel <byte[]> > CreateAsync()
        {
            PrivateStream stream = new PrivateStream(_configuration);

            _privateStreamListener.OnNext(stream);

            return(Task.FromResult <IMqttChannel <byte[]> >(new PrivateChannel(stream, _identifier, _configuration)));
        }