Skip to content

Instantly share code, notes, and snippets.

@fzankl
Last active January 24, 2021 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fzankl/fd0e6a43b2c3294cbf9b0d38b30d7e96 to your computer and use it in GitHub Desktop.
Save fzankl/fd0e6a43b2c3294cbf9b0d38b30d7e96 to your computer and use it in GitHub Desktop.
Starting device stream request using Azure IoT Hub
var serviceClient = ServiceClient.CreateFromConnectionString(
serviceConnectionString,
TransportType.Amqp);
var deviceStreamRequest = new DeviceStreamRequest("ServiceStream");
var result = await serviceClient.CreateStreamAsync(
deviceId,
deviceStreamRequest,
cancellationTokenSource.Token).ConfigureAwait(false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment