scoop:scoop.platform:0.1.0
platform/posix/resolve.scoop
Selected production source · platform/posix/resolve.scoop
1
package scoop.platform.net3
import scoop.platform.fs.withNativeString4
import scoop.platform.system.OsString6
internal fun platformResolve(host: OsString, port: Int, family: Int): NativeResolution {7
@Unsafe8
{9
return host.withNativeString {10
pointer -> @Unsafe11
{12
return@withNativeString nativeResolve(pointer, port, family)13
}14
}15
}16
}18
@Extern(name = "scoop_platform_resolve")19
private fun nativeResolve(host: Ptr<Byte>, port: Int, family: Int): NativeResolution