RakNet
RakNetSignalConnection.Disconnect
Disconnects a connection returned by RakNet.OnPacketSend.Connect or RakNet.OnPacketReceive.Connect. The method returns no values.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Disconnects a connection returned by RakNet.OnPacketSend.Connect or RakNet.OnPacketReceive.Connect. The method returns no values.
RakNetSignalConnection.Disconnect(connection: RakNetSignalConnection)
| Name | Type | Required | 説明 |
|---|---|---|---|
Disconnect | () -> () | Yes | Removes the connection from the packet signal. |
Connected | boolean | Yes | true while the connection still exists for the current RakNet hook generation. |
if RakNet.is_enabled then
local connection = RakNet.OnPacketSend:Connect(function(packet)
print(packet.Size)
end)
connection:Disconnect()
print(connection.Connected)
end