(bind-func receiver
(let ((buflen:i64 1024)
(buf:i8* (zalloc buflen)))
(lambda ()
(println "Starting receiver...")
(let ((bytes (nn_recv RECV_SOCKET buf buflen 0)))
(if (> bytes 0)
(printf "message received: %s\n" buf)
0)))))