1920212223242526272829
} @Override public void emit(Runnable callback) { long id = socket.registerAcknowledgement(Acknowledgement.create(callback)); Packet packet = Packet.builder() .data(payload) .id(id) .build(); socket.sendPacket(packet); }
2930313233343536373839
} @Override public void emit(Callback<Arguments> callback) { long id = socket.registerAcknowledgement(Acknowledgement.create(callback)); Packet packet = Packet.builder() .data(payload) .id(id) .markDataAck() .build(); socket.sendPacket(packet);
2122232425262728293031
payload.setArgs(checkNotNull(args, "args")); } @Override public void emit() { Packet packet = Packet.builder() .type(PacketType.EVENT) .data(payload) .build(); packetReceiver.sendPacket(packet); }