nn::http::Connection::Initialize Member Functionnn::Result Initialize( const char * pUrl, RequestMethod method = REQUEST_METHOD_GET, bool isUseDefaultProxy = true );
| Name | Description | |
|---|---|---|
| in | pUrl | URL string for host to communicate with. |
| in | method | HTTP request method (if unspecified, nn::http::REQUEST_METHOD_GET is used by default).) |
| in | isUseDefaultProxy | Specifies whether to use the default proxy settings that are configured for the device. (Specify true to use the default proxy settings. If unspecified, this value will default to true.) |
Result listed below. | Value | Description |
|---|---|
ResultSuccess |
Process was successful. |
| ResultConnectionAddErr | Error indicating that the maximum number of manageable HTTP sessions are already in use by the device, and no more can be allocated. This function can be used once another HTTP session finishes, so try again later after another module finishes with an HTTP session, or after closing another local Connection class instance by calling Finalize. |
| ResultRequestUrlErr | Error indicating that the specified URL is invalid. Specify a valid URL and call this function again. |
| ResultAlreadyAssignHostErr | Error indicating that the remote host has already been allocated. This function has already been run for this Connection instance, and the URL is already configured. Use this instance as-is to connect with the previously configured URL. To change the URL, you must call this function again after first calling Finalize. |
| ResultConnectionProcessMaxErr | Error indicating that the maximum number of connections used by one process has been reached. This function can be used once another HTTP session finishes, so try again after closing another local Connection class instance by calling Finalize. |
| ResultIpcSessionMaxErr | Error indicating that the maximum number of IPC sessions are already connected. Trying again later may succeed (provided another IPC session succeeds in the meantime). |
| ResultInvalidParamErr | Error indicating an invalid parameter. Specify valid values for all parameters and call this function again. |
| ResultNotInitializedErr | Error indicating that the library is not initialized. None of this library's functions can be used until you first call nn::http::Initialize. |
| A value other than the above. | Unexpected error (See http_Result.h for details). |
Initializes a Connection and assigns a URL and method to it.
CONFIDENTIAL