For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-net/classes/PacketReceivedBeforeEvent.md.

Class: PacketReceivedBeforeEvent experimental

event network

Beta

当服务器从客户端接收到网络数据包时发送。如果取消,服务器将不会解析该网络数据包, 并会静默忽略它。

Sent as the server receives a network packet from a client. If cancelled, the server will not parse the network packet and will silently ignore it.

Properties

cancel

cancel: boolean

Beta


packetId

readonly packetId: PacketId

Beta

Remarks

网络数据包的类型。

The type of network packet.


packetSize

readonly packetSize: number

Beta

Remarks

该网络数据包的字节大小。

The size of the network packet in bytes.


sender?

readonly optional sender?: any

Beta

Remarks

将该网络数据包发送给游戏服务器的客户端。

Which client sent the network packet to the game server.

同领域相关