Skip to content

Connection doesn't work #137

@AlejandroAguilarP

Description

@AlejandroAguilarP

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions