> For the complete documentation index, see [llms.txt](https://equ8.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://equ8.gitbook.io/documentation/integration-guide/receiving-data-from-the-server.md).

# 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++

{% tabs %}
{% tab title="C/C++" %}

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

{% endtab %}

{% tab title="C#" %}

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

{% endtab %}
{% endtabs %}
