public IotHubConnection(IotHubConnectionString connectionString, AccessRights accessRights) { this.connectionString = connectionString; this.accessRights = accessRights; this.faultTolerantSession = new FaultTolerantAmqpObject <AmqpSession>(this.CreateSessionAsync, this.CloseConnection); this.refreshTokenTimer = new IOThreadTimer(s => ((IotHubConnection)s).OnRefreshToken(), this, false); }
public AmqpDeviceClient(IotHubConnectionString connectionString, bool useWebSocketOnly) { this.IotHubConnection = connectionCache.GetConnection(connectionString, useWebSocketOnly); this.deviceId = connectionString.DeviceId; this.openTimeout = IotHubConnection.DefaultOpenTimeout; this.operationTimeout = IotHubConnection.DefaultOperationTimeout; this.DefaultReceiveTimeout = IotHubConnection.DefaultOperationTimeout; this.faultTolerantEventSendingLink = new FaultTolerantAmqpObject <SendingAmqpLink>(this.CreateEventSendingLinkAsync, this.IotHubConnection.CloseLink); this.faultTolerantDeviceBoundReceivingLink = new FaultTolerantAmqpObject <ReceivingAmqpLink>(this.CreateDeviceBoundReceivingLinkAsync, this.IotHubConnection.CloseLink); }
public AmqpDeviceClient(IotHubConnectionString connectionString, AmqpTransportSettings transportSettings) { this.IotHubConnection = connectionCache.GetConnection(connectionString, transportSettings); this.deviceId = connectionString.DeviceId; this.openTimeout = IotHubConnection.DefaultOpenTimeout; this.operationTimeout = IotHubConnection.DefaultOperationTimeout; this.DefaultReceiveTimeout = IotHubConnection.DefaultOperationTimeout; this.faultTolerantEventSendingLink = new FaultTolerantAmqpObject <SendingAmqpLink>(this.CreateEventSendingLinkAsync, this.IotHubConnection.CloseLink); this.faultTolerantDeviceBoundReceivingLink = new FaultTolerantAmqpObject <ReceivingAmqpLink>(this.CreateDeviceBoundReceivingLinkAsync, this.IotHubConnection.CloseLink); this.prefetchCount = transportSettings.PrefetchCount; }
public IotHubConnection(IotHubConnectionString connectionString, AccessRights accessRights, AmqpTransportSettings amqpTransportSettings) { this.connectionString = connectionString; this.accessRights = accessRights; this.faultTolerantSession = new FaultTolerantAmqpObject <AmqpSession>(this.CreateSessionAsync, this.CloseConnection); #if WINDOWS_UWP this.refreshTokenTimer = new IOThreadTimerSlim(s => ((IotHubConnection)s).OnRefreshToken(), this, false); #else this.refreshTokenTimer = new IOThreadTimer(s => ((IotHubConnection)s).OnRefreshToken(), this, false); #endif this.amqpTransportSettings = amqpTransportSettings; }