reply_loop   xtlang


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

Implementation

(bind-func reply_loop
  (let ((reqlen:i64 1024)
        (reqbuf:i8* (zalloc reqlen))
        (replen:i64 1024)
        (repbuf:i8* (zalloc replen))
        (running 1))
    (lambda ()
      (println "starting reply_loop...")
      (while (= running 1)
        (let ((reqbytes (nn_recv REPLY_SOCKET reqbuf reqlen 0)))
          (if (> reqbytes 0)
              (begin (sprintf repbuf "%s: message received from %.*s at time: %lld"
                              (getenv "USER") reqbytes reqbuf (now))
                     (if (< (nn_send REPLY_SOCKET repbuf (+ 1 (convert (strlen repbuf))) 0) 0)
                         (nn_println_strerror "error in user_name_handler"))))))
      (println "stopping reply_loop"))))


Back to Index

Similar Entries

  • AudioBuffer_read_looped    xtlang
  • AudioBuffer_read_looped    xtlang
  • _glib_main_loop_call    xtlang
  • _glib_main_loop_call    xtlang
  • _glib_main_loop_call    xtlang
  • _gst_main_loop_call    xtlang
  • beat_loop    xtlang
  • gl-loop    scheme
  • gl-loop    scheme
  • gl-loop    scheme
  • gl-loop    scheme
  • gl-loop    scheme
  • gl-loop    xtlang
  • gl-loop    xtlang
  • gl-loop    xtlang
  • gl-loop    scheme
  • gl-loop    scheme
  • gl-loop    scheme
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • gl_draw_loop    xtlang
  • glib-main-loop    scheme
  • glib-main-loop    scheme
  • glib_main_loop    xtlang
  • gst-main-loop    scheme
  • gui_render_loop    xtlang
  • impc:ir:compiler:loop    scheme
  • impc:ir:compiler:loop    scheme
  • impc:ir:compiler:while-loop    scheme
  • impc:ti:doloop    scheme
  • loop    scheme
  • loop    scheme
  • loop    scheme
  • loop    scheme
  • loop    scheme
  • loop    scheme
  • loop    scheme
  • loop    scheme
  • loop2    scheme
  • loop2    scheme
  • mainLoop    xtlang
  • mainLoop    xtlang
  • midi-loop    scheme
  • midi-loop    scheme
  • midi_read_loop    xtlang
  • my-gl-loop    xtlang
  • node_reply_function    xtlang
  • node_reply_loop    xtlang
  • node_reply_loop_stop    xtlang
  • node_reply_socket_init    xtlang
  • nonblocking_read_loop    xtlang
  • nonblocking_read_loop    xtlang
  • nonblocking_read_loop    xtlang
  • nonblocking_read_loop    xtlang
  • nvg_draw_loop    xtlang
  • nvg_draw_loop    xtlang
  • nvg_draw_loop    xtlang
  • nvg_draw_loop    xtlang
  • opengl-loop    scheme
  • opengl-loop    scheme
  • opengl-loop    scheme
  • opengl-loop    scheme
  • receiver_loop    xtlang
  • rmap-loop-runner    macro
  • run_main_event_loop    xtlang
  • set_up_reply_socket    xtlang
  • shadertoy-loop    scheme
  • xtm-setup-and-start-gl-loop    scheme