mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 22:10:01 -04:00
add python wsproxy implementation
This commit is contained in:
parent
1de7178523
commit
09ff32dcd3
6 changed files with 52 additions and 47 deletions
|
@ -16,6 +16,7 @@ EMSCRIPTEN_OPTIONS="-lwebsocket.js -sASYNCIFY -sALLOW_TABLE_GROWTH -sEXPORTED_FU
|
|||
|
||||
if [ "$1" = "release" ]; then
|
||||
COMPILER_OPTIONS="-O3 $COMPILER_OPTIONS"
|
||||
EMSCRIPTEN_OPTIONS="-sSINGLE_FILE $EMSCRIPTEN_OPTIONS"
|
||||
fi
|
||||
|
||||
#ensure deps are compiled
|
||||
|
|
|
@ -24,8 +24,6 @@ int write_function(void *data, size_t size, size_t nmemb, DataCallback data_call
|
|||
}
|
||||
|
||||
void perform_request(const char* url, const char* json_params, DataCallback data_callback, EndCallback end_callback, const char* body, int body_length) {
|
||||
printf("downloading %s\n", url);
|
||||
|
||||
CURL *http_handle;
|
||||
CURLM *multi_handle;
|
||||
int still_running = 1;
|
||||
|
|
|
@ -4,7 +4,7 @@ window.libcurl = (function() {
|
|||
//emscripten compiled code is inserted here
|
||||
/* __emscripten_output__ */
|
||||
|
||||
const websocket_url = `wss://${location.hostname}/ws`;
|
||||
const websocket_url = `wss://${location.hostname}/ws/`;
|
||||
|
||||
const status_messages = {
|
||||
100: "Continue",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue