Skip to content

Request time out #1501

Open
Open
@binitvermanigspann

Description

@binitvermanigspann

Hi,

I'm experiencing a "request timeout" issue when trying to connect to localhost using Socket.IO.

However, the connection works perfectly fine with Telnet and when using input/output streams.

The problem seems to be isolated to Socket.IO.

Socket Version: 15.2.0

ERROR SocketEnginePolling: The request timed out.
ERROR SocketEngine: The request timed out.
ERROR SocketManager: The request timed out.

Code:

let socketManager = SocketManager(socketURL: URL(string: "http://localhost:8000")!, config: [.log(true), .compress])
let socket = socketManager.defaultSocket

socket.on(clientEvent: .connect) { data, ack in
    print("Socket connected")
}

socket.on(clientEvent: .disconnect) { data, _ in
    print("Socket disconnected")
}

socket.connect()

Any suggestions on how to resolve this?

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