Options
All
  • Public
  • Public/Protected
  • All
Menu

Multi class that acts as an wrapper around the native libcurl multi handle.

C++ source code

Using this class instead of just the {@link "Easy".Easy | Easy} allows one to run requests asynchronously.

For usage see examples/04-multi.js

The {@link "Curl".Curl | Curl} class uses one of this internally to provide asynchronous usage of the library.

Hierarchy

  • MultiNativeBinding

Index

Methods

addHandle

  • Adds an {@link "Easy".Easy | Easy} handle to be managed by this instance.

    The request will start right after calling this method.

    Official libcurl documentation: curl_multi_add_handle()

    Parameters

    Returns CurlMultiCode

close

  • close(): void
  • Closes this multi handle.

    After the handle has been closed it must not be used again.

    This is basically the same than curl_multi_cleanup()

    Returns void

getCount

  • getCount(): number
  • Returns the number of {@link "Easy".Easy | 'Easy'} handles that are currently inside this instance

    Returns number

onMessage

  • Allow to provide a callback that will be called when there are new information about the handles inside this instance.

    This is basically an abstraction over curl_multi_info_read()

    Pass null to remove the current callback set.

    Parameters

    Returns this

removeHandle

setOpt

strError

  • Returns a description for the given error code.

    Official libcurl documentation: curl_multi_strerror()

    Parameters

    Returns string

Generated using TypeDoc