what's the quickest/easiest way to do some IPC wit...
# kotlin-native
k
what's the quickest/easiest way to do some IPC with Kotlin/Native on Linux? Both processes in Kotlin, of course...
m
Open a socket?
Might be a bit low level but I can't think of any higher level alternative lib
And use kotlinx.serialization.protobuf to serialize/deserialize?
k
yeah, was looking for something at least a bit higher level than sockets...
m
Actually, maybe ktor and HTTP 🙃 ?
But I don't think the server part can do native just yet
n
Named pipes ( https://www.geeksforgeeks.org/named-pipe-fifo-example-c-program/ ) might do the trick. Sockets have more overhead than pipes. Here is a video that demonstrates named pipes in action:

https://youtu.be/2hba3etpoJg

👍 2
Note that named pipes cannot be accessed remotely (some could see this as a security feature), outside of the computer it is created on unlike sockets.
181 Views