class SocketIoClient {

    void sendPacket(final Packet packet) {
        if (mConnection.getReadyState() == ReadyState.OPEN) {
            mEncoder.encode(packet, objects -> {
                // TODO: Check for volatile flag

                for (Object item : objects) {
                    final io.socket.engineio.parser.Packet engineIoPacket = new io.socket.engineio.parser.Packet(io.socket.engineio.parser.Packet.MESSAGE);
                    engineIoPacket.data = item;
                    mConnection.send(engineIoPacket);
                }
            });
        }
    }

      SocketIoClient(SocketIoServer server, EngineIoSocket connection);

}