mirror of https://github.com/hykilpikonna/AquaDX
[-] Revert aeab453e
parent
a374f7a44b
commit
2b6c283cd1
|
@ -64,6 +64,11 @@ fun ActiveClient.handle(msg: Msg) {
|
|||
lastHeartbeat = millis()
|
||||
send(ctlMsg(Command.CTL_HEARTBEAT))
|
||||
}
|
||||
Command.DATA_BROADCAST -> {
|
||||
// Broadcast to all clients. This is only used in UDP so SID is always 0
|
||||
if (msg.proto != Proto.UDP) return log.warn("TCP Broadcast received, something is wrong.")
|
||||
clients.values.forEach { it.send(msg.copy(src = stubIp)) }
|
||||
}
|
||||
Command.DATA_SEND -> {
|
||||
target ?: return log.warn("Send: Target not found: ${msg.dst}")
|
||||
|
||||
|
|
|
@ -8,9 +8,11 @@ import ext.str
|
|||
object Command {
|
||||
// Control plane
|
||||
const val CTL_START = 1u
|
||||
const val CTL_BIND = 2u
|
||||
const val CTL_HEARTBEAT = 3u
|
||||
const val CTL_TCP_CONNECT = 4u // Accept a new multiplexed TCP stream
|
||||
const val CTL_TCP_ACCEPT = 5u
|
||||
const val CTL_TCP_ACCEPT_ACK = 6u
|
||||
const val CTL_TCP_CLOSE = 7u
|
||||
|
||||
// Data plane
|
||||
|
|
Loading…
Reference in New Issue