/// <summary>
        /// Create stream connection through iot hub methods.
        /// </summary>
        /// <param name="streamId">Local reference address of the stream</param>
        /// <param name="remoteId">Remote reference of link</param>
        /// <param name="proxy">The proxy server</param>
        /// <returns></returns>
        public Task <IConnection> CreateConnectionAsync(Reference streamId,
                                                        Reference remoteId, INameRecord proxy, CodecId encoding)
        {
            IConnection conn = new IoTHubStream(_hubConnectionString, streamId, remoteId, proxy, null);

            // TODO: Revisit:  At this point we could either a) look up a host from the registry
            // then use it to create a dedicated stream with connection string or b) create an
            // adhoc dr stream record in the registry.

            return(Task.FromResult(conn));
        }
Example #2
0
        /// <summary>
        /// Create stream connection through iot hub methods.
        /// </summary>
        /// <param name="streamId">Local reference id of the stream</param>
        /// <param name="remoteId">Remote reference of link</param>
        /// <param name="proxy">The proxy server</param>
        /// <returns></returns>
        public Task <IConnection> CreateConnectionAsync(Reference streamId,
                                                        Reference remoteId, INameRecord proxy)
        {
            IConnection conn = new IoTHubStream(this, streamId, remoteId, proxy,
                                                null);

            // TODO: Revisit:  At this point we could either a) look up a host from the registry
            // then use it to create a dedicated stream with connection string or b) create an
            // adhoc dr stream entry in the registry.  However, due to overall IoTHub performance
            // characteristic there is at this point no performance benefit from doing so.

            return(Task.FromResult(conn));
        }