curl_write_callback   xtlang


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

Implementation

(bind-func curl_write_callback
  (let ((cdat:curl_dat* null)
        (cdat_current_ptr (lambda () (pref-ptr (tref cdat 0) (tref cdat 1))))
        ;; define your own custom callback to change MAX_BUFFER_SIZE
        (MAX_BUFFER_SIZE 1000000))
    (lambda (ptr:i8* size:size_t nmemb:size_t dat:i8*)
      (let ((total_bytes (* size nmemb)))
        (set! cdat (cast dat curl_dat*))
        (if (> (+ (tref cdat 1) total_bytes)
               MAX_BUFFER_SIZE)
            (begin (printf "curl_write_callback buffer overflow!\n") 0)
            (begin
              (memcpy (cdat_current_ptr) ptr total_bytes)
              (tset! cdat 1 (+ (tref cdat 1) total_bytes))
              total_bytes))))))


Back to Index

Similar Entries

  • PaStreamCallbackTimeInfo_print    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • PaStreamCallbackTimeInfo_toString    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portaudio.xtm
  • audio_callback:PaStreamCallback    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/portaudio.xtm
  • audio_callback:PaStreamCallback    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/portaudio.xtm
  • callback    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • callback-adapter    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • callback-test2-helper    xtlang    /digego/extempore/tree/v0.8.9/tests/core/xtlang.xtm
  • callback_goodbye_world    xtlang    /digego/extempore/tree/v0.8.9/examples/external/ulfius.xtm
  • callback_hello_world    xtlang    /digego/extempore/tree/v0.8.9/examples/external/ulfius.xtm
  • clock_scheduler_main_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/core/scheduler.xtm
  • curl    macro    /digego/extempore/tree/v0.8.9/libs/contrib/cas.xtm
  • curl_perform_request    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_print_version    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_request    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_request_with_auth    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_request_with_header    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_setopts_authenticate    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_setopts_basic    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_setopts_header    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • curl_setup    xtlang    /digego/extempore/tree/v0.8.9/libs/external/curl.xtm
  • glfw_char_callback:GLFWcharfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_cursor_position_callback:GLFWcursorposfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_error_callback:GLFWerrorfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_key_callback:GLFWkeyfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_mouse_button_callback:GLFWmousebuttonfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_window_focus_callback:GLFWwindowfocusfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • glfw_window_position_callback:GLFWwindowposfun    xtlang    /digego/extempore/tree/v0.8.9/libs/external/glfw3.xtm
  • gui_window_size_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gui.xtm
  • impc:ir:compiler:callback    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmir.xtm
  • impc:ti:callback    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • impc:ti:callback-check    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • listener-callback    scheme    /digego/extempore/tree/v0.8.9/examples/contrib/nanomsg.xtm
  • ocv_VideoWriter    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_VideoWriter    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_VideoWriter    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_VideoWriter1    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imwrite    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imwrite    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imwrite    scheme    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imwrite1    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_imwrite2    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • ocv_write    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/xtmcv.xtm
  • pm_write    xtlang    /digego/extempore/tree/v0.8.9/libs/external/portmidi.xtm
  • read_and_write_frame    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/opencv_test.xtm
  • rtmidi_default_callback:RtMidiCCallback    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • rtmidi_register_callback    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/rtmidi.xtm
  • sys_file_write    xtlang    /digego/extempore/tree/v0.8.9/libs/external/system.xtm
  • write    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • write_colour    xtlang    /digego/extempore/tree/v0.8.9/libs/external/gl/gl-objects2.xtm
  • xtmdoc-write-alist-args-as-json    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm
  • xtmdoc-write-alist-as-json    scheme    /digego/extempore/tree/v0.8.9/runtime/llvmti.xtm