Skip to content

Close socket inside channel #17

Description

@edge90

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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