send_response   xtlang


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

Implementation

(bind-func send_response
  (let ((msglen:i64 4096)
        (msg:i8* (zalloc msglen))
        (continue #t))
    (lambda (buf:i8* nbytes:i32)
      (printf "revieved survey: %.*s\n" nbytes buf)
      (sprintf msg "RESPONSE ")
      (sprintf (pref-ptr msg (strlen msg)) "%s" buf)
      (let ((msglen (+ (strlen msg) 1))
            (bytes (nn_send RESPONDENT_SOCKET msg msglen 0)))
        (if (or (< bytes 0) (< bytes (convert msglen)))
            (nn_println_strerror)
            void)))))


Back to Index

Similar Entries

  • fleet_response_error_p    xtlang
  • io:osc:send    scheme
  • my_osc_send    xtlang
  • nnsock_set_send_timeout    xtlang
  • osc_send_one_double    xtlang
  • osc_send_two_double    xtlang
  • pm_send    xtlang
  • print_response    xtlang
  • print_response    xtlang
  • rtmidi_send    xtlang
  • send-fluid-column-osc    xtlang
  • send-fluid-first-column-osc    xtlang
  • send-fluid-first-row-osc    xtlang
  • send-fluid-last-row-osc    xtlang
  • send-fluid-row-osc    xtlang
  • send-midi-cc    scheme
  • send-skel    scheme
  • send-skeleton-osc    xtlang
  • send_outgoing_walkers    xtlang
  • send_process_message    xtlang
  • send_request    xtlang
  • send_response    xtlang
  • send_survey    xtlang
  • sender    xtlang
  • sender    xtlang