How to connect over TCP from ionic (phonegap) to websocket on server? - go

I have installed and running this script on server: https://github.com/gorilla/websocket
Everything was configured and running ok when I was using ios native application but now I have to switch to phonegap and I cannot find example which is working.
I cannot move to another script on my server because it would be to much work.
Is there any way that I can connect to my server from phonegap ionic?
My application is for ios and android, it's game which needs real time connection just like chat application.
Thank you

Related

Could the server and app run in the same domain?

The situation I met is that.
I design a frontend app by React, but I want to connect to MongoDB.
From what I knew so far, I could only connect to MongoDB in the backend. So, I use the express to set up a server but when I try to connect the frontend to the backend, the answer I found seems to tell me that I should run the server and the app on different domains, so I should run the server and app on different Heroku apps.
Could I put the server and app in just one Heroku app and connect between them?

Whi isnt my Heroku Deployed spring-boot/angular/aws-rds application not contacting server on mobile devices?

I have set up and successfully deployed a spring-boot application storing data in a aws-rds, as well as a angular 7 client-side application that uses Okta for authentication. All deployed on Heroku. On my computer, everything works fine, but on any mobile devices (iphone, ipad, android phone), the application is not reaching (or even seeming to attempt) to reach the server application. I don't even know where to start debugging. Does anyone have any suggestions?

Cordova + Win10 + WebSocket: connection fails with SECURITY_ERR

I'm porting an existing Cordova app from Android to Windows 10. The app must open a WebSocket connection to a remote server. At the moment, the connection always fails with the error "WebSocket Error: SECURITY_ERR, Cross zone connection not allowed". The same app is also making regular AJAX requests to the same server and they're working fine.
I'm using Visual Studio 2017 and testing the app locally, using Edge/13.10586.
Is it possible to make the WebSocket connection to work?
UPDATE
My app has both "Internet (Client)" and "Private Networks (Client & Server)" capabilities set. Further tests show that the problem is caused by the combination of web context ("ms-appx-web:") and attempting to connect the WebSocket to a non-FQDN (I'm using only the hostname). If I use FQDN or the IP address instead, it works. If I use local context ("ms-appx:") instead, with non-FQDN, it works.

Connect to php websocket server with xamarin android

I'm trying to use websockets in Xamarin. I already have a websocket server written in php and I want to connect to it with an Android client app using Xamarin.
Is it possible do that? Or can I just connect to .NET servers?
Thank you so much!!

How do I enable loopback for a UWP Windows 10 app as TCP server?

I’m working on Windows 10 with a Universal Windows (UWP) app.
I’m using a StreamSocketListener in the UWP app to listen as a server.
I enabled “Internet (Client)” and “Private Networks (Client & Server) in the app manifest.
I used CheckNetIsolation.exe tool to enable loopback for my UWP app.
This works: sending TCP messages to the UWP app from remote machines.
This fails, but I NEED IT TO WORK: sending TCP messages to the StreamSocketListener in the UWP app from the local machine.
The CheckNetIsolation.exe tool seems to have no effect for UWP app as a server. I need to have the UWP app as a server in order to send messages to the app from a local service.
Some bad choices I could make as workaround:
I could have the app poll the service, but that's very poor and expensive architecture choice.
I could message the app from a remote machine, but that complicates things and (for complicated reasons) is very undesirable solution.
Can I fix the UWP as TCP server with a registry edit?
c:\>checknetisolation loopbackexempt -a -n=package family name
UWP Enable local network loopback

Resources