s <- socket("rep", listen = "inproc://nanonext")
s1 <- socket("req", dial = "inproc://nanonext")
r <- recv_aio(s, timeout = 500)
if (!send(s1, "")) {
p <- tryCatch(collect_pipe(r), error = identity)
print(p)
reap(p)
}
close(s)
close(s1)
Run the code above in your browser using DataLab