Expand description
Online packets are packets that are sent when the client is connected to the server and are used to keep the connection alive, and to send game packets to the server.
The following module provides the following packets:
ConnectedPing
ConnectedPong
LostConnection
ConnectionRequest
ConnectionAccept
NewConnection
Disconnect
During this stage, the client and server are exchanging information about each other, to initialize the connection within raknet, and completing the connection handshake.
Structs§
- Connected
Ping - This packet is sent by either the client or the server to the other peer.
The other peer should respond with a
ConnectedPong
packet. In general you should be sending this packet every 5 seconds to keep the connection alive.
If you do not continue to send this packet, the connection will be closed after the other peer does not receive aConnectedPong
packet for the configured timeout option. - Connected
Pong - Sent in response to a
ConnectedPing
packet. - Connection
Accept - A connection Accept packet, this is sent by the server to the client. This is sent by the server and contains information about the server.
- Connection
Request - A connection Request Request, this contains information about the client. Like it’s current time and the client id.
- Disconnect
- A disconnect notification. Tells the client to disconnect.
- Lost
Connection - A connection lost notification. This is sent by the client when it loses connection to the server.
- NewConnection
- Going to be completely Honest here, I have no idea what this is used for right now, even after reading the source code.
Enums§
- Online
Packet - An enum of all Online packets.