Server on Hololens

Hi, I'm trying to create a server for Hololens in order to receive HTTP requests coming from an object which is developed with Arduino... Both the object and the hololens will be connected to the same WIFI.. I've got a script written in python that is able to manage the requests but i've got some trouble in translating it for UWP

Answers

  • Not sure if this will help you as I don't know how you are developing your application for HoloLens (e.g. it might be a 2D UWP app built in C++/C# or it might be written in C#/Unity etc).

    I recently made use of the HttpListener class (from .NET Standard 2.0) in order to serve HTTP content from a specific folder on the device to clients making requests for that content. My usage only involves handling GET verbs and only involves serving binary content.

    As far as I know, .NET Standard 2.0 is available to applications running on the operating system version 16299 and onwards.

    My code for doing this is embedded into some other code but you can find it in this github repository in Unity script form if it's of help to you. Specifically, this class takes on the job of taking a UWP StorageFolder and trying to make its contents available over HTTP.

    That might not be 100% what you want and my implementation may well not be 100% right but I hope that perhaps helps you along a little?

Sign In or Register to comment.