ionic 6 websocket client cordova plugin - ionic-framework

I'm using ionic 6 (with Angular). Is there a websocket client plugin?
I want to communicate with a websocket server written in c# but I can't find any plugins to use ionic as websocket client.

You don't need a dedicated ionic plugin if you just want to subscribe to a websocket. Existing angular websocket libraries should work.
I personally prefer using socket-io, which works perfectly fine: https://socket.io/

I suggest you to use the same websocket pattern on backend as the frontend. The socket.io doesn't communicate with others websockets, so it means you need to check first which WS actually you are using on backend to keep using the same on the mobile App.

Related

Flutter web is there any solution to connecting to xmpp jabber

I been trying for 3 days to connect to XMPP server through web sockets on flutter web.
Tried the xmpp_stone package which uses dart.io so can't use it for web and tried the web_support version of that again connection kept getting failed.
I tried xmpp_dart package, strophe, and dart:html WebSocket no luck.
it would be helpful if I get some suggestions or some solution to this

Flutter Socket-Io is not connecting to server?

I'm new to Flutter and I'm trying to create simple chat chat app with Nodejs and Flutter. I'm using Socketio for real time communication.
When I try react client to connect my server, it is working but Flutter is not working. I used this package https://pub.dev/packages/flutter_socket_io .
I had same issue before. It is version issue. According to developer of that package, it is working with socket io version 2 so you should use older version of socket io on server-side.
You can see Why my Flutter app does not connect to my local nodejs server?

Send data from server to a client (Raspberry Pi) without pull request

I have a Raspberry Pi and I am developing an application on the Pi that can be controlled by a web portal.
So I need to know, if I change something in my website, how will that be transferred to my Pi which is a client without any pull request from the client.
One solution could be to install Apache on your Raspberry and setup a basic http PHP or Python API. When a change is posted on the website, the back-end script makes a API call to the Raspberry API service.
If you are using PHP as your web server, you could use json_decode(file_get_contents(...) to access the Raspberry API.
I'll suggest you to use Websockets.
Websockets are bidirectional and client and server can communicate whenever they want as TCP session is ongoing. So, yo will not need to do polling.
You can download and compile libwebsockets for your raspberry as server or as I did in one of my previous projects, you can install nodejs into the raspberry and use socket.io library to handle all. Of course, you will need to do some modifications in your web page to behave like websocket client or socket.io client.
Good luck!

Upgrade to webSocket message in play web sockets using scala

I am new to play framework and implementing web sockets using iteratees in Scala but when I run in browser it prints upgrade to Web sockets required with no compiler error. I have attached my snippet here. Please help. Am using Ubuntu platform.

Can I use socket.io with Play Framework 2.0 Web Sockets?

There's a sample application that comes with Play Framework 2.0. The application uses Play's WebSocket implementation on the server side. I am wondering can I use socket.io on the client side to connect with Play's WebSocket implementation on the server side?
In theory, yes, you can make Socket.io connect to your websocket server wia the corresponding ws url.
In practice, I tried and I had some issues, so it might require you to adapt Socket.io for it to work properly. Granted I tried on 2.0.1 or similar, so it may be working currently with no issues.