# Streaming Red Slice to mobile device

**URL:** <https://discourse.slicer.org/t/streaming-red-slice-to-mobile-device/10927>\
**Category:** Development\
**Tags:** openigtlink, networking\
**Created:** [March 31, 2020, 7:14am UTC](https://discourse.slicer.org/t/streaming-red-slice-to-mobile-device/10927 "2020-03-31T07:14:04Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 13, 2021, 6:27pm UTC](https://discourse.slicer.org/t/streaming-red-slice-to-mobile-device/10927/21 "2021-10-13T18:27:33Z")

</div>

Sending out of OpenIGTLink messages in response to MRML node changes are implemented here:

> <https://github.com/openigtlink/SlicerOpenIGTLink/blob/7178920290c24efc88b22be91d6389e99451d214/OpenIGTLinkIF/MRML/vtkMRMLIGTLConnectorNode.cxx#L2239-L2258>

You could probably leave this code mostly as is (just add an option to send output messages asynchronously), and update the `SendMessage` method implementation in OpenIGTLinkIO to support asynchronous sending (make a copy of the message buffer, put it in a queue, and in a separate thread get the items from the queue and send them).

Before you start this, you need to build Slicer and SlicerOpenIGTLink extension. It would also make sense to do some profiling and fix the crash before you start developing the asynchronous message sending, so probably a RelWithDebInfo mode build would make the most suitable.

---

<div class="post-metadata">

**Author:** ![cshreyas](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@cshreyas](https://discourse.slicer.org/u/cshreyas)\
**Post date:** [October 13, 2021, 6:36pm UTC](https://discourse.slicer.org/t/streaming-red-slice-to-mobile-device/10927/22 "2021-10-13T18:36:30Z")

</div>

Thanks Andras for the inputs. Will try it out.

[Previous page](https://discourse.slicer.org/t/streaming-red-slice-to-mobile-device/10927.md?page=1)
