コード例 #1
0
 public PrivateChannel(PrivateStream stream, EndpointIdentifier identifier, MqttConfiguration configuration)
 {
     this.stream        = stream;
     this.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()
        {
            var stream = new PrivateStream(configuration);

            privateStreamListener.OnNext(stream);

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