nonblocking_read_loop   xtlang


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

Implementation

(bind-func nonblocking_read_loop
  (let ((buflen:i64 1024)
        (buf:i8* (zalloc buflen))
        (continue #t))
    (lambda ()
      (if (< RESPONDENT_SOCKET 0)
          (nn_println_strerror)
          (let ((nbytes (nn_recv RESPONDENT_SOCKET buf buflen NN_DONTWAIT)))
            ;; if we get some bytes, trigger the callback
            (if (> nbytes 0)
                (send_response buf nbytes))))
      (if continue
          (callback (+ (now) 1000) nonblocking_read_loop)
          (begin
            (println "stopping nonblocking_read_loop")
            0)))))


Back to Index

Similar Entries

  • AudioBuffer_read    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_interp    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_interp_mix    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_interp_pw    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_looped    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • AudioBuffer_read_looped    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • _glib_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • _glib_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • _glib_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • _gst_main_loop_call    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/mediaplayer.xtm
  • astra_readX    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/orbbec_test.xtm
  • astra_reader    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/orbbec_test.xtm
  • audiofile_aiff_read_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_read_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • audiofile_wave_read_samples    xtlang    /digego/extempore/tree/v0.8.9/libs/core/audiobuffer.xtm
  • beat_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/going-native.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline-scm.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/game-of-life.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_vg.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/drawtext.xtm
  • gl-loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/particles.xtm
  • gl-loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • gl-loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/spectrogram.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/arrows.xtm
  • gl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/particles.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nuklear.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/raymarcher.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender3.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender2.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/gl-compatibility.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender1.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender5.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender4.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender6.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/simple-triangle.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/framebuffer.xtm
  • gl_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/triangle.xtm
  • glib-main-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/slideshow.xtm
  • glib-main-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • glib_main_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo.xtm
  • gst-main-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/mediaplayer.xtm
  • gui_render_loop    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • impc:compiler:print-already-bound-error    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ir:compiler:loop    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ir:compiler:loop    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ir:compiler:while-loop    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ti:doloop    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/core/audio_101.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/rtmidi.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/polysynth.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/kinect.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/particles.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/opencv_test.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/sampler.xtm
  • loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/sing_a_song.xtm
  • loop2    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/polysynth.xtm
  • loop2    scheme    /digego/extempore/tree/v0.8.9/examples/external/sampler.xtm
  • mainLoop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/horde3d_knight.xtm
  • mainLoop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/bullet.xtm
  • midi-loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/portmidi.xtm
  • midi-loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/portmidi-output.xtm
  • midi_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/portmidi.xtm
  • midi_read_msg    xtlang    /digego/extempore/tree/v0.8.9/libs/external/midi.xtm
  • my-gl-loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluid_dynamics.xtm
  • node_reply_loop    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • node_reply_loop_stop    xtlang    /digego/extempore/tree/v0.8.9/libs/external/fleet-node.xtm
  • nonblocking_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-request.xtm
  • nonblocking_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-reply.xtm
  • nonblocking_read_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg-surveyor.xtm
  • nvg_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/chipmunk-simple.xtm
  • nvg_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/datavis.xtm
  • nvg_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanovg_helper.xtm
  • nvg_draw_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/external/openvg.xtm
  • ocv_imread    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imread    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imread    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imread1    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imread2    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_read    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_read    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_read    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_read1    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_read2    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • opengl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/shadowmap.xtm
  • opengl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/multilight.xtm
  • opengl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/shaderlight.xtm
  • opengl-loop    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/gstvideo_multi.xtm
  • read_and_write_frame    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/opencv_test.xtm
  • receiver_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm
  • reply_loop    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm
  • rmap-loop-runner    macro    /digego/extempore/tree/v0.8.9/libs/core/pattern-language.xtm
  • run_main_event_loop    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • sf_read_file_into_buffer    xtlang    /digego/extempore/tree/v0.8.9/libs/external/sndfile.xtm
  • shadertoy-loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/shadertoy.xtm
  • svm_read_line    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/svm.xtm
  • svm_read_problem    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/svm.xtm
  • sys_file_read    xtlang    /digego/extempore/tree/v0.8.9/libs/external/system.xtm
  • thread_native_call    xtlang    /digego/extempore/tree/v0.8.9/libs/core/xthread.xtm
  • thread_native_call_with_zone    xtlang    /digego/extempore/tree/v0.8.9/libs/core/xthread.xtm
  • xhid_read    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/hid.xtm
  • xtm-setup-and-start-gl-loop    scheme    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline-scm.xtm