HoloLens websockets - websocket

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?

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.

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.

Related

Nativescript SSDP discovery

I'm trying to discover devices connected to local network via SSDP, was trying to use node-ssdp lib but got error regarding dgram not found, my understanding is that this dependency is not supported by nativescript,
is there any alternative, either how to do socket udp/tcp or if there is already existing lib.
Was thinking of using Android Wifi P2P discovery but i think better have something platform independent.
Thanks

Flutter implementing socket.io with dart

i am trying to implement socket.io with my flutter app, currently flutter is supporting WebSocket but i have found a way for socket.io in package "dart.io" but i am unable to understand how to emit a message on a specific event. Any suggestions would be helpful :)
I have ported socket.io in dart code since 2017, and it can work with flutter as well in the same codebase - socket.io-client-dart and socket.io-dart.
Using this flutter_socket_io package, I managed to connect to my local Socket IO server.
SocketIO socket = SocketIOManager().createSocketIO("http://localhost:3000", "/");
socket.init();
socket.connect();
Maybe you could share your implementation on both client and server side to debug further.
I think you looking for this flutter_socket_io

How can you use a WebSocket client in a Flutter app?

Is there a way to open a WebSocket client in a Flutter app? Flutter doesn't allow you to import dart:html, which is the normal way of using a WebSocket client.
In Flutter you can use dart:io which supports WebSocket
https://api.dartlang.org/stable/1.24.2/dart-io/WebSocket-class.html

Xamarin messaging by Websockets SignalR

SignalR for Xamarin doesn't have way to work through Websockets.
I have a web service with messaging by SygnalR by websockets.
Can i receive message in Xamarin without implementing SignalR to Xamarin?
Is it important to have SignalR on Xamarin client side?
If you have implemented a SignalR hub in your sever, you can use SignalR Client nuget in Xamarin. The transport will be SSE (Server Sent Events) by default, but it works pretty well.
Implementing a websocket in the client just to connect to a SignalR server makes no sense at all, unless you really need to use WebSockets instead of SSE.
SignalR uses transports to connect to the server. The portable version of SignalR client does not support the webSockets transport since there is no portable version of WebSocket client available. This is fine since there are two more transports - longPolling and serverSentEvents that can be used to talk to the server.
You can't connect to the SignalR 2.x server with bare webSockets. There is a protocol that needs to be followed and if a client does not follow this protocol its requests will be rejected.
If you absolutely need to use websockets you can implement your own websockets transport by implementing the IClientTransport interface and pass it to the Start method. This is how the webSockets transport is supported on UWP. Here is all the code I needed to write.

Is it still possible to use unsecured websockets with Firebase?

I am trying to integrate Firebase with my Cocos2d-JS application. Unfortunately, Cocos2d-JS does not support secure websockets, so I am trying to connect to Firebase using the WS protocol. Firebase is returning a 404 when I try this. Is it possible to enable the unsecured websocket endpoint with Firebase? It would be great to use this while developing, and then work on getting secure websockets working once the game is finished. The game is just for a uni project, so security is not a major concern.
Per #Kato's comment, this is not currently possible. You must use SSL.
If this is something you need, please make a Cocos2d-JS feature request or a Firebase feature request.

Resources