receiver_loop   xtlang


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

Implementation

;; so we need to put it into a loop
(bind-func receiver_loop
  (let ((buflen:i64 1024)
        (buf:i8* (zalloc buflen))
        (running 1))
    (lambda ()
      (println "starting receiver_loop...")
      (let ((bytes -1))
        (while (= running 1)
          (set! bytes (nn_recv RECV_SOCKET buf buflen 0))
          (if (> bytes 0)
              (printf "message received: %s\n" buf)))
        (println "stopping receiver_loop")))))


Back to Index

Similar Entries

  • 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
  • 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: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
  • 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-respondent.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
  • 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
  • receiver    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
  • shadertoy-loop    scheme    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/shadertoy.xtm
  • xtm-setup-and-start-gl-loop    scheme    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline-scm.xtm