mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 00:32:35 -08:00
Better handshake and device connection check for UDP
This commit is contained in:
1 parent
9c60cb8097
commit
c8c4c62136
11 files changed
+270
-58
No files matched your search
@@ -4,4 +4,7 @@ import io.ktor.network.sockets.InetSocketAddress
|
||||
import io.ktor.network.sockets.toJavaAddress
|
||||
|
||||
// Prevent DNS lookup when getting the address
|
||||
fun resolveDesktopUdpAddress(addr: InetSocketAddress): String = (addr.toJavaAddress() as java.net.InetSocketAddress).hostString
|
||||
fun resolveDesktopUdpAddress(addr: InetSocketAddress): String {
|
||||
val socketAddress = addr.toJavaAddress() as java.net.InetSocketAddress
|
||||
return "${socketAddress.hostString}/${socketAddress.port}"
|
||||
}
|
||||
Reference in new issue
Block a user