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

Close socket inside channel #17

Open
edge90 opened this issue Nov 27, 2014 · 0 comments
Open

Close socket inside channel #17

edge90 opened this issue Nov 27, 2014 · 0 comments

Comments

@edge90
Copy link

edge90 commented Nov 27, 2014

The following example code does not work correctly, the end method is undefined.

var ann = multiplexer.registerChannel('ann');
ann.on('connection', function(conn) {
    conn.write('Ann says hi!');
    conn.on('data', function(data) {
        conn.write('Ann nods: ' + data);
        conn.end();
    });
});

If I log the "conn" variable with console.log it outputs:

{ conn:
{ _session:
{ ....

So I'll have to call conn.conn.end to get this to work.

node v0.10.33

@edge90 edge90 changed the title h Close socket inside channel Nov 27, 2014
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