Nativescript angular TCP connection library? - sockets

Greetings fellow citizens of StackOverFlow.
I'm trying to make an IRC Client in nativescript, and I am struggling to find a library to connect to a TCP server for nativescript.
I tried with nativescript-simple-networking and nativescript-socket-tcp
The first one failed to compile with angular.
The second one upon installation it says that It's only compatible with iOS.
Any recommendations of a Library or how can i connect to an IRC Server?
Is it possible to Connect to an IRC server with Socket.io?

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

Web Socket: IIS WebSocket Protocol feature need to be enabled for Socket.io?

For one of my application, I have implemented Web socket using socket.io and hosted in IIS. Currently socket connection helping to provide two way connection between client (React) and server (node.js).
As I mentioned, I have hosted my application in IIS. I have few doubts regarding Turn Windows features on or off -> Internet Information services -> World wide Web Services -> Application Development Features -> WebSocket Protocol. I have tested my application without enabling this feature, its working fine, but I would like to confirm below stuffs.
WebSocket Protocol
Do I really need to enable WebSocket protocol feature to make websocket work in my application? If so, how now it is working fine without enabling (I haven't do performance and stress testing, I may face issue on this).
What if I not enabling this feature? in short what is the actual use of this feature?
It would be helpful if anyone answer the above questions. Thanks in advance.
WebSocket as part of the HTTP stack requires a bunch of things to be ready on Windows (across multiple components), so hope this answer helps a little.
HTTP.sys, a driver deep down in Windows OS, is upgraded to support the necessary packet communication required by the protocol.
The IIS WebSocket module, an IIS extension which many other Microsoft frameworks (like SignalR) depend on.
So WebSocket support is by default on in HTTP.sys, and you don't need the IIS module if your framework (socket.io) has no dependency there.
Note that the "Summary" section provides several useful links,
https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support#summary
and the same article also reveals that IIS WebSocket module has
conflicts with socket.io.

How to configure Xmpp library in flutter?

I was searching for solution to use xmpp library on flutter to connect with ejabberd server for chatting app. Anyone's suggestion will be very help for me.
XMPP connection made with flutter by using the xmpp_stone library. My Github repository is here. The main problem is, it connects without tls connection. In your ejabberd configuration yaml file line starttls: true, starttls_required: true should be commented.
If you have a better solution please suggest me. Thanks in advance!!!
I founded one way to connecting ejabberd server flutter given Strophe library enter link description here Strophe.js is an XMPP library for JavaScript. Its primary purpose is to enable web-based, real-time XMPP applications that run in any browser.

XBOX One Permission over TCP Socket

I have developed a unity game which listens to a TCP port. I have used System.Net.Sockets.TcpListener class to achieve this.
I have ported the game for UWP (using IL2CPP scripting backend). I also have checked internetClientServer and privateNetworkClientServer capabilities in the Visual Studio.
After creating the package and installing the package using XBOX Remote Access, it will work successfully. But after restarting the console the game crashes when a client wants to connect.
Exception: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Appreciate any help

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!