Skip to content

consider making websocket transport consistent to others #11

@dvv

Description

@dvv

Needs to measure what's the fastest -- 10xsend('A'), or 1xsend('AAAAAAAAAA').
And what is more reliable, at least virtually, a priori.

That's how I monkey patch the client, so far:

eio.transports.websocket.prototype.onData = function (data) {
  data = eio.parser.decodePayload(data)
  for (var i = 0, l = data.length; i < l; i++) {
    this.onPacket(data[i])
  }
};
eio.transports.websocket.prototype.write = function (packets) {
  this.socket.send(eio.parser.encodePayload(packets));
};

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