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

Listen callback does not fire until first connection #53

Open
giodamelio opened this issue Mar 10, 2016 · 1 comment
Open

Listen callback does not fire until first connection #53

giodamelio opened this issue Mar 10, 2016 · 1 comment

Comments

@giodamelio
Copy link

When using vantage in standalone mode, the listen callback does not fire until I connect to it with the command line client.

var Vantage = require('vantage');
var vantageServer = new Vantage();

vantageServer
  .delimiter('$')
  .listen(2001, function() {
    console.log('Started vantage server at http://localhost:2001');
  });
@zakhenry
Copy link
Contributor

zakhenry commented Jun 5, 2016

This is by design, see

this.io.on("connection", function(socket) {
- the callback is called on the socket connection event, not when the vantage server is initialised.

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

2 participants