Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Networking to a C++ Application

I have a TCP Socket in a C++ application. I want it to send messages (byte arrays) to the Hololens over the air. This sounds simple, but is becoming incredibly frustrating.

System.Net.Sockets is not supported on Universal 10. Unfortunately, I cannot create Threads in Unity in Universal 10 either - meaning I don't think I can use async operations properly.

Unity has a Networking class, but so far I've been unable to glean how to actually connect it to my C++ (Winsock2) socket.

What is the accepted way of networking over sockets with Unity on the Hololens?



  • I have the same question. Answers appreciated!

  • trzytrzy ✭✭✭

    I haven't yet had the pleasure of working with Unity's networking interfaces but I would first look at the lower-level Network Transport API: https://docs.unity3d.com/Manual/UNetUsingTransport.html

    If that's insufficient, why not write a DLL in C++? You could just use sockets there?
    Judging from HoloToolkit, it should be pretty trivial to link the DLLs to your project. See my post here asking about how to build HoloToolkit (not HoloToolkit-Unity) for information on the different build targets and what they mean.

Sign In or Register to comment.