I'm trying to set socket timeouts on Kotlin/Native...
# kotlin-native
h
I'm trying to set socket timeouts on Kotlin/Native (Windows host). The function
setsockopt(..., const char *optval, int optlen)
requires a
const char
pointer, that points to raw memroy (not a string). Kotlin/Native translates this to a Kotlin String. Is it somehow possible to craft a Kotlin String with access to the raw memory (and not be bound to UTF-8/16 chars)? Or is it possible to override the String conversion for platform libraries (I know it's possible with
noStringConversion = ...
for custom libraries)