# HTTPCallback Struct Reference

Callback for when the HTTP handler has something to tell us. More...

`#include <tcp_http.h>`

Inheritance diagram for HTTPCallback:

## Public Member Functions
virtual void | OnFailure ()=0
| An error has occured and the connection has been closed.
virtual void | OnReceiveData (const char *data, size_t length)=0
| We're receiving data.
virtual | ~HTTPCallback ()
| Silentium.

## Detailed Description

Callback for when the HTTP handler has something to tell us.

Definition at line 22 of file tcp_http.h.

## Member Function Documentation

virtual void HTTPCallback::OnFailure | ( |  | ) | `[pure virtual]`

An error has occured and the connection has been closed.

Note:
  HTTP socket handler is closed/freed.

Implemented in ClientNetworkContentSocketHandler.

Referenced by NetworkHTTPSocketHandler::HTTPReceive(), NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(), and NetworkHTTPContentConnecter::OnFailure().

virtual void HTTPCallback::OnReceiveData | ( | const char * | data,
|  | size_t | length |
| ) |  |  | `[pure virtual]`

We're receiving data.

Parameters:

  | data | the received data, NULL when all data has been received.
  | length | the amount of received data, 0 when all data has been received.

Note:
  When NULL is sent the HTTP socket handler is closed/freed.

Implemented in ClientNetworkContentSocketHandler.

Referenced by NetworkHTTPSocketHandler::Receive().

The documentation for this struct was generated from the following file:

- src/network/core/tcp_http.h