Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not connect to node server #24

Open
RayKahn opened this issue Feb 19, 2016 · 2 comments
Open

Can not connect to node server #24

RayKahn opened this issue Feb 19, 2016 · 2 comments

Comments

@RayKahn
Copy link

RayKahn commented Feb 19, 2016

Hello,
I have been trying to use socket.io to connect to a node server running on a secure port using wss or ws. I have not had much luck in the past couple of days. I need to send a message to the node server using socket.io. Here is my code (I am using net.iamyellow.tiws):

VOOMZI_WS = 'wss://my_ip_address:9443';
var io = require('socket.io');
var socket = io.connect(Alloy.Globals.VOOMZI_WS, {
'transports' : ['websocket']
});
socket.on('connect', function() {
console.log('connected');
});
socket.on('error', function(e) {
console.log('disconnected: ' + JSON.stringify(e));
});
The end result is always the same "disconnected: 'The network connection was lost.'" I am using a self-signed certificate, BTW.

Can someone tell me why is this happening?

Greatly appreciate any help here.

@SPorwal
Copy link

SPorwal commented Feb 24, 2016

I am also facing the same issue with it. It happens more than half of the times I run my code. @RayKahn Did you find anything?

@RayKahn
Copy link
Author

RayKahn commented Feb 24, 2016

@SPorwal I am afraid I have not. I am still waiting for some answers. Let me know please if you do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants