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

Connection doesn't work #137

Open
AlejandroAguilarP opened this issue Jul 24, 2021 · 0 comments
Open

Connection doesn't work #137

AlejandroAguilarP opened this issue Jul 24, 2021 · 0 comments

Comments

@AlejandroAguilarP
Copy link

AlejandroAguilarP commented Jul 24, 2021

The connection doesn't work in an alloy application.
I develop a websocket server with socket.io on Node Js and It works. But a can't connect the app with the server.

I use 9.3.2.GA Titanium SDK and the las versions of titanium-socketio
Code:

`const io = require('ti.socketio');
const host = Ti.Platform.osname === 'android' ? '192.168.0.9' : 'localhost';
const port = '8080';
const url = `http://${host}:${port}`;
setTimeout(() => {
const socket = io.connect(url, { forceNew: true});
socket.on('connect', () => {
    
    Ti.API.info(socket.id);
    socket.disconnect();
    
});
}, 2000);`

Can someone help me?

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

1 participant