s1 <- socket("pair", listen = "inproc://nanonext")
s2 <- socket("pair", dial = "inproc://nanonext")
res <- send_aio(s1, data.frame(a = 1, b = 2), timeout = 100)
collect_aio(res)
msg <- recv_aio(s2, timeout = 100)
collect_aio_(msg)
msg[]
close(s1)
close(s2)
Run the code above in your browser using DataLab