(Packet<JSONArray> packet)
| 398 | } |
| 399 | |
| 400 | private void onack(Packet<JSONArray> packet) { |
| 401 | Ack fn = this.acks.remove(packet.id); |
| 402 | if (fn != null) { |
| 403 | if (logger.isLoggable(Level.FINE)) { |
| 404 | logger.fine(String.format("calling ack %s with %s", packet.id, packet.data)); |
| 405 | } |
| 406 | fn.call(toArray(packet.data)); |
| 407 | } else { |
| 408 | if (logger.isLoggable(Level.FINE)) { |
| 409 | logger.fine(String.format("bad ack %s", packet.id)); |
| 410 | } |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | private void onconnect(String id) { |
| 415 | this.connected = true; |