mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Fixed polling write and writeMany
This commit is contained in:
@@ -141,22 +141,24 @@ Polling.prototype.doClose = function () {
|
||||
* Writes a packets payload.
|
||||
*
|
||||
* @param {Array} data packets
|
||||
* @param {Function} drain callback
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Polling.prototype.writeMany = function (packets) {
|
||||
this.doWrite(parser.encodePayload(packets));
|
||||
Polling.prototype.writeMany = function (packets, fn) {
|
||||
this.doWrite(parser.encodePayload(packets), fn);
|
||||
};
|
||||
|
||||
/**
|
||||
* Writes a single-packet payload.
|
||||
*
|
||||
* @parma {Object} data packet
|
||||
* @param {Object} data packet
|
||||
* @param {Function} drain callback
|
||||
* @api private
|
||||
*/
|
||||
|
||||
Polling.prototype.write = function (packet) {
|
||||
this.writeMany([packet]);
|
||||
Polling.prototype.write = function (packet, fn) {
|
||||
this.writeMany([packet], fn);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user