# WireStats: bytesIn property

> The bytesIn property of the WireStats interface is the size of the protocol messages the client has received.

The **`bytesIn`** property of the [`WireStats`](/docs/client/wire-stats) interface is the total size, in bytes, of the protocol messages the client has received since it was created, across reconnects.

## Value

A number of bytes, from 0. Sizes are of protocol messages as encoded, without the transport's own framing, such as a WebSocket frame header.

## Examples

### Warning about a heavy room

A client warns in the console once the room has sent it more than 5 MB, a sign that its interest sends too much.

```ts
// heavy-room.ts
import type { ReadyRoomClient } from "@irtio/client";

export function warnWhenHeavy(room: ReadyRoomClient) {
  const watching = new AbortController();
  room.addEventListener(
    "update",
    () => {
      if (room.stats.bytesIn <= 5 * 1024 * 1024) return;
      console.warn(`received ${room.stats.bytesIn} bytes so far`);
      watching.abort();
    },
    { signal: watching.signal },
  );
}
```

## See also

- [`WireStats.received`](/docs/client/wire-stats/received), for the bytes by message type
- [`WireStats.bytesOut`](/docs/client/wire-stats/bytesout)
- [State sync and interest](/docs/room/guides/state-sync)
