Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HoloLens websockets

I'm trying to program a websocket client for the HoloLens using System.Net.Sockets;. It works in Unity but when I try to build it for the HoloLens I get errors like:

Socket does not contain a definition of Connect

The websocket libraries for Unity also don't work. How can I create a websocket client for the HoloLens?

like image 388
J. Daniel Avatar asked Nov 21 '16 12:11

J. Daniel


2 Answers

I believe you will need to use websockets for UWP for the hololens and use System.Net.Sockets for the Unity Editor and wrap the UWP code in NETFX_CORE or WINDOWS_UWP define.

like image 161
meng Avatar answered Sep 21 '22 17:09

meng


You could use WWW unity object to send and receive http requests/answers! I had no problem connecting with http protocol with the hololens using this.

like image 37
rmTheZ Avatar answered Sep 23 '22 17:09

rmTheZ