* Sends multiple packets. * * @param {Array} packets
(packets)
| 112 | * @param {Array} packets |
| 113 | */ |
| 114 | public send(packets) { |
| 115 | if (this.readyState === "open") { |
| 116 | this.write(packets); |
| 117 | } else { |
| 118 | // this might happen if the transport was silently closed in the beforeunload event handler |
| 119 | debug("transport is not open, discarding packets"); |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Called upon open |