Skip to content

Close socket inside channel #17

@edge90

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

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