# RoomClient: transportKind property

> The transportKind read-only property of the RoomClient interface says what carries the client's connection, WebTransport or WebSocket.

The **`transportKind`** read-only property of the [`RoomClient`](/docs/client/room-client) interface says what carries the client's current connection.

## Value

`"webtransport"`, `"websocket"` or `undefined`. It's `undefined` until the first connection is dialled, and when a custom `dial` returns a transport that doesn't say its `kind`.

## Description

The client dials WebTransport at the room's URL first. When the platform has no WebTransport, as Node doesn't, or it doesn't connect within 3 seconds, the client uses WebSocket, and stays on WebSocket for later reconnects. Over WebTransport, unreliable messages go as datagrams; over WebSocket they go in order with the reliable ones.

A custom `dial`, passed to [`connect()`](/docs/client/connect) in a `DevConnectInit`, sets it from its transport's `kind`. A dial that wraps [`dialWebSocket()`](/docs/client/dialwebsocket) keeps the inner transport's.

## Examples

### Reporting the transport with a bug report

A bug report includes the room, the transport the client connected over and the connection's timing.

```ts
// bug-report.ts
import type { RoomClient } from "@irtio/client";

export function connectionReport(room: RoomClient): string {
  return [
    `room ${room.id}, protocol ${room.protocol}`,
    `transport ${room.transportKind ?? "custom"}`,
    `rtt ${Math.round(room.rtt)} ms, jitter ${Math.round(room.jitter)} ms`,
  ].join("\n");
}
```

## See also

- [`connect()`](/docs/client/connect)
- [`dialWebSocket()`](/docs/client/dialwebsocket)
