EQU8 Documentation
Search…
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++

C/C++
C#
1
std::unique_ptr<packet> p{serialize_packet(buf, len)};
2
if(packet_type::equ8_data == p->id)
3
{
4
auto equ8 = static_cast<const packet_equ8_data *>(p.get());
5
equ8_client_on_data_received(equ8->data, equ8->size);
6
}
Copied!
1
packet p = Packet.serialize_packet(data);
2
if(packet_type.equ8_data == p.id)
3
{
4
var s = ((packet_equ8_data)p);
5
equ8.client.on_data_received(s.data);
6
}
Copied!
Last modified 1yr ago
Copy link
Contents