Members
(static) code
Returned results from net.Curl.Multi#.addHandle and net.Curl.Multi#.removeHandle.
Code | Description |
---|---|
CALL_MULTI_PERFORM | Please call curl_multi_perform() soon |
OK | No error |
BAD_HANDLE | Invalid multi handle |
BAD_EASY_HANDLE | Invalid easy handle |
OUT_OF_MEMORY | Out of memory |
INTERNAL_ERROR | Internal error |
BAD_SOCKET | Invalid socket argument |
UNKNOWN_OPTION | Unknown option |
ADDED_ALREADY | The easy handle is already added to a multi handle |
(static) option
Option | Description |
---|---|
MAXCONNECTS | maximum number of entries in the connection cache |
MAX_HOST_CONNECTIONS | maximum number of (pipelining) connections to one host |
MAX_PIPELINE_LENGTH | maximum number of requests in a pipeline |
CONTENT_LENGTH_PENALTY_SIZE | a connection with a content-length longer than this will not be considered for pipelining |
CHUNK_LENGTH_PENALTY_SIZE | a connection with a chunk length longer than this will not be considered for pipelining |
PIPELINING | set to 1 to enable pipelining for this multi handle |
PIPELINING_SITE_BL | a list of site names(+port) that are blacklisted from pipelining |
PIPELINING_SERVER_BL | a list of server types that are blacklisted from pipelining |
MAX_TOTAL_CONNECTIONS | maximum number of open connections in total |
(static) seekfunc
These are the return codes for the seek callbacks
seekfunc | Description |
---|---|
OK | |
FAIL | fail the entire transfer |
CANTSEEK | tell curl seeking can't be done, so curl might try other means instead |
Methods
(static) strError(code) → {string}
Return the description for the given code
Parameters:
Name | Type | Description |
---|---|---|
code |
Number |
Returns:
- Type
- string
addHandle(easy) → {Number}
Add an easy instance and perform the request
Parameters:
Name | Type | Description |
---|---|---|
easy |
net.Curl.Easy |
Returns:
- Type
- Number
getCount() → {Number}
Get the number of running easy instances
Returns:
number of running easy instances
- Type
- Number
onMessage(callback) → {Number}
Setup a callback whenever an easy request is completed (success of failure)
Parameters:
Name | Type | Description |
---|---|---|
callback |
Multi~onMessageCallback |
Returns:
- Type
- Number
removeHandle(easy) → {Number}
Remove a running easy instance and stop it
Parameters:
Name | Type | Description |
---|---|---|
easy |
net.Curl.Easy |
Returns:
- Type
- Number
setOpt(option, parameter)
Modify options for multi
Parameters:
Name | Type | Description |
---|---|---|
option |
Number | |
parameter |
any |
Type Definitions
onMessageCallback(easyHandle, result)
Callback when an curl easy request is completed (success of failure)
Parameters:
Name | Type | Description |
---|---|---|
easyHandle |
net.Curl.Easy | |
result |
Number |