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

Unable to connect #8

Open
wyqydsyq opened this issue Mar 29, 2018 · 0 comments
Open

Unable to connect #8

wyqydsyq opened this issue Mar 29, 2018 · 0 comments

Comments

@wyqydsyq
Copy link

wyqydsyq commented Mar 29, 2018

So I'm trying to use this in a new, minimal Koa app. Following the Readme I have this code:

// websocket server
const io = new IO({
  namespace: '/'
})
io.start(http.createServer(app.callback()), {}, config.port, config.host)

// handle incoming ws client connections
io.on('connect', handleClientConnection)
io.on('ready', handleClientConnection)
io.on('join', handleClientConnection)

app.listen(config.port)

handleClientConnection is just firing a console.log for testing, which never fires, so it seems the Socket.IO server never starts or never accepts client connections.

My client throws when attempting to connect: Connection closed before receiving a handshake response

It seems this module is either broken entirely or has outdated docs, how is this supposed to work?

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