# RoomClient: protocol property

> The protocol read-only property of the RoomClient interface is the client protocol version the connection speaks.

The **`protocol`** read-only property of the [`RoomClient`](/docs/client/room-client) interface is the version of the client protocol the connection speaks.

## Value

A number: the newest version the client, the router and the room all speak, from the router's answer to each connection. It's `0` until the router accepts the first connection.

## Description

A router or room that doesn't speak a version this client accepts closes the connection with 4000; update `@irtio/client`. The room sees the same version as [`connection.protocol`](/docs/room/connection/protocol).

## Examples

### Logging the protocol on connect

A client logs the protocol version the room speaks once it's connected.

```ts
// protocol.ts
import { connect } from "@irtio/client";

const room = await connect("main");
console.log(`room ${room.id} speaks client protocol ${room.protocol}`);
```

## See also

- [`Connection.protocol`](/docs/room/connection/protocol), the room's side
- [Errors and close codes](/docs/client/errors)
