Communication between socket.io 2.2.1 and 4.4.1 - socket.io

Is there any way to communicate between socket server 4.4.1 and socket client 2.2.1 (at least temporarily until the clients upgrade their application)?
Technology stacks are node-based server and ios-based mobile application.

Related

Which version of MQTT is Mosquitto broker hosting

Good day
I would like to host MQTT V1.3 or V1.3.1 with Mosquitto on Windows. The client I am connecting with only supports V1.3 and V1.3.1 while Mostquitto also supports V5.
How do I configure or how can I determine what version of MQTT has been hosted?
Thank you
The CONNECT packet is the first thing sent over the connection and includes a "Protocol Level" (v3.0 & 3.1 = 3 (cannot differentiate these two versions), v3.11 = 4, v5 = 5).
The broker will process this and, if it does not support the requested level, respond with 'Unsupported Protocol Version' and disconnect.
If the broker supports multiple versions of the protocol it will use the "Protocol Level" to determine which version of the protocol to use for the specific connection (it's quite possible to have v3.1.1 and v5 clients connected to Mosquitto at the same time).

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.

Does each SignalR hub has a dedicated websocket

Assuming both browser & Server supports a web-socket connection.
If I've got 2 hubs on my SignalR server. and my SignalR client connects to both. does that mean that my signalR client will open up 2 separate web-socket connections to the server?
In SignalR v2+, hubs will share the same connection. I've had systems with connections to 4+ hubs without performance issue.
Question is a bit of a duplicate of: Multiple signalR connections/hubs on your website

WebSocket support for ejabberd

I am looking to implement WebSocket communication via ejabberd xmpp server...
The only module that I have found so far is this repository:
ejabberd-websockets
This repository has not been updated for 4 year so I do not feel very comfortable using it.
Any alternatives or reviews on above mentioned repository?
From ejabberd 15.03 version, WebSockets are fully supported, as stated here:
ejabberd 15.03 released, with Websockets support
You could also try node-xmpp-bosh which is a node.js based connection manager that sits in front of the XMPP server and handles BOSH and XMPP over WebSockets. The XMPP server sees all traffic as standard XMPP traffic.
I know that the BOSH part works well, but haven't tried WebSockets.

Mqttjs websocket support

I'm experimenting with mqttjs and websockets and I wish to be able to send messages from a webpage using websockets without a bridge to an MQTT broker that is run by mqttjs. I can't find any information if this is available or even possible.
I've looked at mosquitto and they have "experimental" websocket support and I would love to find a Node.JS MQTT broker which could offer the same.
Thus far I got the communication working with pywebsocket and Socket.IO. I would really appreciate pointers in any direction if it is possible to use websockets to mqtt without bridging.
Thanks.
Is old question but is good to share my findings.
You can use the mosca broker that is written in node.js and is using mqtt.js
The mosca is supporting classic mqtt connection and mqtt over WS :
MQTT-over-Websockets
Mosca can operate in two modes: Standalone and as a node.js module.
In general mosca can support many types of brokers:
Mosca-advanced-usage
HiveMQ supports native websockets, which means you can use any Javascript MQTT library (like Eclipse Paho.js with websockets. It's perfectly possible to connect some clients vie websockets and other clients via standard TCP connection. The websocket support is stable and used in production.
The only drawback for you could be that HiveMQ is not written in Node.JS.
Disclosure: I am one of the developers of HiveMQ.

Resources