sender   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm

Implementation

(bind-func sender
  (lambda (msg:i8*)
    (let ((sz_msg (+ (strlen msg) 1))
          (bytes (nn_send SEND_SOCKET msg sz_msg 0)))
      (if (< bytes 0) ;; should also check (< bytes (convert sz_msg))
          (nn_println_strerror)
          void))))


Back to Index

Similar Entries