RakNet
Dostępne funkcje
RakNet.add_receive_hook
Registers a callback for observed incoming RakNet packets. The callback receives one RakNetPacket while the packet is valid. Registering the same closure again replaces its stored reference. The function returns the callback it was given.
RakNet.add_send_hook
Registers a callback for observed outgoing RakNet packets. The callback receives one RakNetPacket while the packet is valid. Registering the same closure again replaces its stored reference. The function returns the callback it was given.
RakNet.is_enabled
Boolean field on the RakNet table. It is true only when RakNet support is enabled for the current Real session. When it is false, the RakNet table is still present, but the send, hook, signal, priority, and reliability fields are not registered.
RakNet.OnPacketReceive.Connect
Connects a callback to the OnPacketReceive signal table and returns a RakNetSignalConnection. The callback receives a RakNetPacket while the packet is valid.
RakNet.OnPacketSend.Connect
Connects a callback to the OnPacketSend signal table and returns a RakNetSignalConnection. The callback receives a RakNetPacket while the packet is valid.
RakNet.remove_receive_hook
Removes a receive hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.
RakNet.remove_send_hook
Removes a send hook previously registered with the same callback closure. The function returns no values whether or not a matching hook was present.
RakNet.send
Queues packet data for the RakNet send path. The packet can be a string, buffer, array table of byte numbers, RakNetPacket, or RakNetPacketTable. Raw data calls may also pass optional priority, reliability, and orderingChannel values. The call returns no values.
RakNetPacket.Block
Marks a live RakNetPacket as blocked. Ignore resolves to the same method. The method returns no values.
RakNetPacket.SetData
Replaces the data stored on a live RakNetPacket with a string, buffer, or array table of byte numbers. The packet id field is updated from the first byte, or 0 when the new data is empty. The method returns no values.
RakNetSignalConnection.Disconnect
Disconnects a connection returned by RakNet.OnPacketSend.Connect or RakNet.OnPacketReceive.Connect. The method returns no values.