File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ function easy() end
2424--
2525-- @tparam[opt] table options
2626-- @treturn[1] multi new curl multi object
27+ --
28+ -- @usage
29+ -- m = curl.multi{
30+ -- socketfunction = handle_socket;
31+ -- timerfunction = start_timeout;
32+ -- }
33+ --
2734function multi() end
2835
2936--- Create Share object
@@ -433,6 +440,18 @@ function info_read() end
433440-- c:setopt{maxconnects = 10}
434441function setopt() end
435442
443+ --- Perform socket action.
444+ --
445+ -- @tparam[opt=curl.SOCKET_TIMEOUT] number socket
446+ -- @tparam[opt=0] number mask
447+ -- @treturn multi self
448+ --
449+ -- @usage
450+ -- c:socket_action()
451+ -- c:socket_action(sock_fd, curl.CSELECT_IN)
452+ -- c:socket_action(sock_fd, curl.CSELECT_OUT)
453+ function socket_action() end
454+
436455--- Set timer callback.
437456--
438457-- @tparam function timer timer callback
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ static int lcurl_multi_socket_action(lua_State *L){
231231 lcurl_multi_t * p = lcurl_getmulti (L );
232232 curl_socket_t s = lutil_optint64 (L , 2 , CURL_SOCKET_TIMEOUT );
233233 CURLMcode code ; int n , mask ;
234- if (s == CURL_SOCKET_TIMEOUT ) mask = 0 ;
234+ if (s == CURL_SOCKET_TIMEOUT ) mask = lutil_optint64 ( L , 3 , 0 ) ;
235235 else mask = lutil_checkint64 (L , 3 );
236236 code = curl_multi_socket_action (p -> curl , s , mask , & n );
237237 if (code != CURLM_OK ){
You can’t perform that action at this time.
0 commit comments