hfhbd
10/17/2022, 5:28 PMhfhbd
10/17/2022, 5:29 PMval selector = SelectorManager(coroutineScope.coroutineContext)
try {
val socket = PQsocket(conn)
check(socket >= 0) {
"Error while connecting to the PostgreSql socket"
}
while (true) {
selector.select(
object : Selectable {
override val descriptor = socket
},
SelectInterest.READ
)
// my logic
} finally {
selector.close()
}
hfhbd
10/17/2022, 5:30 PMselect(socket)
and execute my logic when getting new inputRustam Siniukov
10/18/2022, 2:34 PMe5l
10/19/2022, 5:53 AMhfhbd
10/19/2022, 6:08 AMe5l
10/19/2022, 7:10 AMaSocket
API as in Jvmhfhbd
10/19/2022, 4:55 PM