Again much like with the server-code, the client must also be able to send and receive data. The integration for the client-side is identical to the one in the server.
Lets start with receiving data sent from the server.
std::unique_ptr<packet> p{serialize_packet(buf, len)};if(packet_type::equ8_data == p->id){auto equ8 = static_cast<const packet_equ8_data *>(p.get());equ8_client_on_data_received(equ8->data, equ8->size);}
packet p = Packet.serialize_packet(data);if(packet_type.equ8_data == p.id){var s = ((packet_equ8_data)p);equ8.client.on_data_received(s.data);}