Receiving data from the server

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.

C/C++

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);
}

Last updated