chunkedge_protocol/packets/configuration/keep_alive_s2c.rs
1use chunkedge_binary::{Decode, Encode};
2
3use crate::{Packet, PacketState};
4
5#[derive(Copy, Clone, Debug, Encode, Decode, Packet)]
6#[packet(state = PacketState::Configuration)]
7/// Should be sent frequently by the server to the client to keep the connection
8/// alive. The client should respond with a
9/// [`KeepAliveC2s`](crate::packets::configuration::KeepAliveC2s) packet with
10/// the same id. If the client does not receive a `KeepAliveS2c` packet within
11/// 20 seconds, it should disconnect.
12pub struct KeepAliveS2c(pub i64);