Create a RequestPacket with a unique id. Metadata can be provided to specify how the data should be serialized.
Unique identifier for the request
Optional
meta: Many<SerializerMetadata<Parameters<T>>>Metadata for serialization
Readonly
classClass name of the packet, used for debugging purposes.
Readonly
idUnique identifier for the request
RemoteFunction used to send the request
Serializer for the data being sent by the request
Optional
virtualVirtual handler that can be used to handle the request on the client
Optional
virtualVirtual handler that can be used to handle the request on the server
Cleans up any resources used by the packet.
Query a client for a response. The client should have a handler set up with fromServer that can handle the toClient. Hence, this function should only be called on the server.
The player to send the toClient to
The data to send
Invoke the request on the server. The server should have a handler set up with fromClient that can handle the toServer. Hence, this function should only be called on the client.
The data to send
A request packet that can be sent between client and server. This packet can be used to send data to the server and receive a response, or toClient a client for a response.