Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 1.00.00

Close an existing HTTP Connection.

Files

http-c.h/http-c.c

Prototype

Arguments

p_conn_obj

Pointer to the HTTPc Connection Object to close.

flags

Configuration flags:

HTTPc_FLAG_CONN_NO_BLOCK

p_err

Pointer to variable that will receive the return error code from this function:

HTTPc_ERR_NONE
HTTPc_ERR_NULL_PTR
HTTPc_ERR_INIT_NOT_COMPLETED
HTTPc_ERR_CONN_IS_USED
HTTPc_ERR_FEATURE_DIS

Returned Values

None.

Required Configuration

None.

Notes / Warnings

  • This function MUST be called after the µC/HTTP-client Suite Initialization has been completed.

  • If the HTTPc Asynchronous Task is enabled (HTTPc_CFG_MODE_ASYNC_TASK_EN macro in http-c_cfg.h), the HTTPc Connection Object will be added to the connection close's queue.  

  • If the HTTPc_FLAG_CONN_NO_BLOCK flag is set, the function will be in non-blocking mode. Therefore, the function could return before the connection closing is finished. For the application to be notified when the closing process completes, the callback function must have been setup before with the parameter type HTTPc_PARAM_TYPE_CONN_CLOSE_CALLBACK