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

Request time out #1501

Open
binitvermanigspann opened this issue Oct 3, 2024 · 0 comments
Open

Request time out #1501

binitvermanigspann opened this issue Oct 3, 2024 · 0 comments

Comments

@binitvermanigspann
Copy link

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?

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