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    /digego/extempore/tree/v0.8.9/libs/external/fleet.xtm
  • io:osc:send    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • my_osc_send    xtlang    /digego/extempore/tree/v0.8.9/examples/core/osc_101.xtm
  • nnsock_set_send_timeout    xtlang    /digego/extempore/tree/v0.8.9/libs/external/nanomsg.xtm
  • osc_send_one_double    xtlang    /digego/extempore/tree/v0.8.9/libs/core/topclock.xtm
  • osc_send_two_double    xtlang    /digego/extempore/tree/v0.8.9/libs/core/topclock.xtm
  • pm_send    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • print_response    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-request.xtm
  • print_response    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-surveyor.xtm
  • rtmidi_send    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • send-fluid-column-osc    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • send-fluid-first-column-osc    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • send-fluid-first-row-osc    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • send-fluid-last-row-osc    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • send-fluid-row-osc    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fluid2d.xtm
  • send-midi-cc    scheme    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • send-skel    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • send-skeleton-osc    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/kinect.xtm
  • send_outgoing_walkers    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mpi/random-walk.xtm
  • send_process_message    xtlang    /digego/extempore/tree/v0.8.9/libs/external/cef/cef.xtm
  • send_request    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-request.xtm
  • send_response    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-reply.xtm
  • send_survey    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-surveyor.xtm
  • sender    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm
  • sender    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm