fleet_message_all_nodes_sync   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/fleet.xtm

Implementation

(bind-func fleet_message_all_nodes_sync
  (let ((buf:i8* (zalloc (* FLEET_NODE_MAX FLEET_NANOMSG_CLIENT_BUFLEN))))
    (lambda (msg:i8*)
      (if (null? FLEET_NODE_SOCKET_LIST)
          (println "Error: FLEET_NODE_SOCKET_LIST is null.")
          (let ((sz_msg (+ (strlen msg) 1)))
            ;; send out the messages (scatter)
            (for-each (lambda (sock)
                        (nn_sock_set_timeout sock 1000)
                        (nn_send sock msg sz_msg NN_DONTWAIT))
                      FLEET_NODE_SOCKET_LIST)
            ;; wait to recieve on all sockets (gather)
            (for-each (lambda (sock)
                        (let ((offset (* (index_of sock FLEET_NODE_SOCKET_LIST)
                                         FLEET_NANOMSG_CLIENT_BUFLEN))
                              (rbytes (nn_recv sock (pref-ptr buf offset) FLEET_NANOMSG_CLIENT_BUFLEN 0)))
                          (if (> rbytes 0)
                              (begin (printf "[%d] %s\n" sock (pref-ptr buf offset))
                                     void))))
                      FLEET_NODE_SOCKET_LIST))))))


Back to Index

Similar Entries

  • AudioBuffer_malloc    xtlang
  • PaStreamCallbackTimeInfo_print    xtlang
  • PaStreamCallbackTimeInfo_toString    xtlang
  • Pm_Event_Message    xtlang
  • Pm_Message    xtlang
  • Pm_Message_Channel    xtlang
  • Pm_Message_Data1    xtlang
  • Pm_Message_Data2    xtlang
  • Pm_Message_Status    xtlang
  • Pm_Message_Type    xtlang
  • Valloc    xtlang
  • Vsetall    xtlang
  • _glib_main_loop_call    xtlang
  • _glib_main_loop_call    xtlang
  • _glib_main_loop_call    xtlang
  • _gst_main_loop_call    xtlang
  • _playbin_bus_call:GstBusFunc    xtlang
  • async    xtlang
  • async    xtlang
  • async_done    xtlang
  • async_kill    xtlang
  • audio_callback:PaStreamCallback    xtlang
  • audio_callback:PaStreamCallback    xtlang
  • call-as-xtlang    macro
  • call-as-xtlang-leaky    macro
  • call-cpp    scheme
  • call-with-input-file    scheme
  • call-with-output-file    scheme
  • call/cc    scheme
  • call_object    xtlang
  • callback    scheme
  • callback-adapter    scheme
  • callback-test2-helper    xtlang
  • callback_goodbye_world    xtlang
  • callback_hello_world    xtlang
  • cef_string_userfree_alloc    xtlang
  • clock-runsync    scheme
  • clock:sync-adjust    scheme
  • clock_scheduler_main_callback    xtlang
  • curl_write_callback    xtlang
  • fleet-connect    scheme
  • fleet-eval    scheme
  • fleet-killemall    scheme
  • fleet_connect_to_nodes    xtlang
  • fleet_delete_unit    xtlang
  • fleet_get_api    xtlang
  • fleet_get_ip_list    xtlang
  • fleet_get_machines    xtlang
  • fleet_get_state    xtlang
  • fleet_get_state    xtlang
  • fleet_get_units    xtlang
  • fleet_message_node_sync    xtlang
  • fleet_print_machines    xtlang
  • fleet_print_state    xtlang
  • fleet_print_state    xtlang
  • fleet_print_unit    xtlang
  • fleet_print_unit_state    xtlang
  • fleet_print_units    xtlang
  • fleet_response_error_p    xtlang
  • fleet_set_unit_state    xtlang
  • fleet_set_unit_state    xtlang
  • fleet_submit_extempore_service    xtlang
  • gboolean_alloc    xtlang
  • gboolean_halloc    xtlang
  • gboolean_zalloc    xtlang
  • gboxed_alloc    xtlang
  • gboxed_halloc    xtlang
  • gboxed_zalloc    xtlang
  • gchar_alloc    xtlang
  • gchar_halloc    xtlang
  • gchar_zalloc    xtlang
  • gdouble_alloc    xtlang
  • gdouble_halloc    xtlang
  • gdouble_zalloc    xtlang
  • gfloat_alloc    xtlang
  • gfloat_halloc    xtlang
  • gfloat_zalloc    xtlang
  • gint64_alloc    xtlang
  • gint64_halloc    xtlang
  • gint64_zalloc    xtlang
  • gint_alloc    xtlang
  • gint_halloc    xtlang
  • gint_zalloc    xtlang
  • glfw_char_callback:GLFWcharfun    xtlang
  • glfw_cursor_position_callback:GLFWcursorposfun    xtlang
  • glfw_error_callback:GLFWerrorfun    xtlang
  • glfw_key_callback:GLFWkeyfun    xtlang
  • glfw_mouse_button_callback:GLFWmousebuttonfun    xtlang
  • glfw_window_focus_callback:GLFWwindowfocusfun    xtlang
  • glfw_window_position_callback:GLFWwindowposfun    xtlang
  • glong_alloc    xtlang
  • glong_halloc    xtlang
  • glong_zalloc    xtlang
  • gobject_alloc    xtlang
  • gobject_halloc    xtlang
  • gobject_zalloc    xtlang
  • godot_alloc    xtlang
  • godot_call    xtlang
  • godot_call    xtlang
  • godot_call    xtlang
  • godot_call    xtlang
  • godot_method_bind_call    xtlang
  • godot_method_bind_ptrcall    xtlang
  • gpointer_alloc    xtlang
  • gpointer_halloc    xtlang
  • gpointer_zalloc    xtlang
  • gstring_alloc    xtlang
  • gstring_halloc    xtlang
  • gstring_zalloc    xtlang
  • guchar_alloc    xtlang
  • guchar_halloc    xtlang
  • guchar_zalloc    xtlang
  • gui_window_size_callback    xtlang
  • guint64_alloc    xtlang
  • guint64_halloc    xtlang
  • guint64_zalloc    xtlang
  • guint_alloc    xtlang
  • guint_halloc    xtlang
  • guint_zalloc    xtlang
  • gulong_alloc    xtlang
  • gulong_halloc    xtlang
  • gulong_zalloc    xtlang
  • impc:ir:compiler:callback    scheme
  • impc:ir:compiler:fptrcall    scheme
  • impc:ir:compiler:heap-alloc    scheme
  • impc:ir:compiler:heap-alloc-with-size    scheme
  • impc:ir:compiler:heap-alloc-without-size    scheme
  • impc:ir:compiler:native-call    scheme
  • impc:ir:compiler:stack-alloc    scheme
  • impc:ir:compiler:stack-alloc-with-size    scheme
  • impc:ir:compiler:stack-alloc-without-size    scheme
  • impc:ir:compiler:zone-alloc    scheme
  • impc:ir:compiler:zone-alloc-with-size    scheme
  • impc:ir:compiler:zone-alloc-without-size    scheme
  • impc:ir:function-calling-convention    scheme
  • impc:ti:allocate-var?    scheme
  • impc:ti:allocate-var?    scheme
  • impc:ti:callback    scheme
  • impc:ti:callback-check    scheme
  • impc:ti:clear-all-vars    scheme
  • impc:ti:closure-call-check    scheme
  • impc:ti:find-all-vars    scheme
  • impc:ti:fptrcall-check    scheme
  • impc:ti:fptrcall-check    scheme
  • impc:ti:gather-all-gvars    scheme
  • impc:ti:gather-all-gvars-helper    scheme
  • impc:ti:heap-alloc-check    scheme
  • impc:ti:rename-all-shadow-vars    scheme
  • impc:ti:stack-alloc-check    scheme
  • impc:ti:zone-alloc-check    scheme
  • ipc:call    scheme
  • ipc:mapcall    scheme
  • ipc:sync-receive    scheme
  • lilv_print_all_lv2_plugins    xtlang
  • lilv_print_all_plugin_ports    xtlang
  • listener-callback    scheme
  • multi_replace_all    xtlang
  • on_process_message_received    xtlang
  • playbin_bus_call    xtlang
  • playbin_bus_call:GstBusFunc    xtlang
  • print_all_devices    xtlang
  • regex:replace-all    scheme
  • regex_replace_all    xtlang
  • regex_replace_all    xtlang
  • regex_replace_all    xtlang
  • regex_replace_all    xtlang
  • remove-all    scheme
  • replace-all    scheme
  • replace_all    xtlang
  • replace_all    xtlang
  • replace_all    xtlang
  • replace_all    xtlang
  • rtmidi_default_callback:RtMidiCCallback    xtlang
  • rtmidi_process_message    xtlang
  • rtmidi_register_callback    xtlang
  • send_process_message    xtlang
  • stbi_flip_vertically    xtlang
  • suppress-compiler-messages    scheme
  • sync-server-receive    scheme
  • sys_file_datasync    xtlang
  • sys_file_datasync    xtlang
  • sys_file_sync    xtlang
  • testitall    xtlang
  • thread_native_call    xtlang
  • thread_native_call_with_zone    xtlang
  • topclock-sync    scheme
  • toplap-clock-sync    scheme
  • xtmdoc-all-doc-alists    scheme