---
title: Ping Request
description: "Status 0x01, client → server."
---

`status` · `0x01` · **serverbound** (client → server)

Sent by the client after `StatusResponse` to measure latency. `time` is an arbitrary client timestamp. The server must echo the same value back in `PongResponse`, after which the connection is closed.

Sent by the client, read by the server. Listen for it with `client.on("PingRequest", (data) => …)` on the receiving side.

## Fields

| Field | Type | Notes |
|---|---|---|
| `time` | Long | also `timestamp` |

## Send it

```ts
// Client side, after receiving StatusResponse.
const sentAt = BigInt(Date.now());
await client.sendPacket("PingRequest", {
  time: sentAt,
});
```

`time` may be any signed 64-bit value. Save it if you want to calculate latency; the server must return it unchanged in `PongResponse`. `timestamp` is accepted as an alias when writing.

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: [`src/Core/Versions/776/Packets/status/serverbound/PingRequest.ts`](https://github.com/GDLev/mc-protocol/blob/master/src/Core/Versions/776/Packets/status/serverbound/PingRequest.ts)
