Skip to content

Socket#emit(name:String[, ...]):Socket #40

@smart--petea

Description

@smart--petea

Emits an event to the socket identified by the string name. Any other parameters can be included.

All datastructures are supported, including `Buffer. JavaScript functions can't be serialized/deserialized.

var io = require('socket.io')();
io.on('connection', function(socket) {
  socket.emit('an event', { some: 'data'});
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions