Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Callbacks that are used for progress and result reporting. More...
#include <UrlClient.h>
Public Member Functions | |
virtual void | OnBodyData (const void *a_Data, size_t a_Size) |
Called when the next fragment of the response body is received, unless the response is an allowed redirect. More... | |
virtual void | OnBodyFinished () |
Called after the response body has been fully reported by OnBody() calls, unless the response is an allowed redirect. More... | |
virtual bool | OnCertificateReceived () |
Called for TLS connections, when the server certificate is received. More... | |
virtual void | OnConnected (cTCPLink &a_Link) |
Called when the TCP connection is established. More... | |
virtual void | OnError (const AString &a_ErrorMsg) |
Called when an asynchronous error is encountered. More... | |
virtual void | OnHeader (const AString &a_Key, const AString &a_Value) |
Called when a single HTTP header is received and parsed, unless the response is an allowed redirect Called once for each incoming header. More... | |
virtual void | OnHeadersFinished () |
Called when the HTTP headers have been fully parsed, unless the response is an allowed redirect. More... | |
virtual void | OnRedirecting (const AString &a_NewLocation) |
Called when a redirect is to be followed. More... | |
virtual void | OnRequestSent () |
Called after the entire request has been sent to the remote peer. More... | |
virtual void | OnStatusLine (const AString &a_HttpVersion, int a_StatusCode, const AString &a_Rest) |
Called after the first line of the response is parsed, unless the response is an allowed redirect. More... | |
virtual void | OnTlsHandshakeCompleted () |
Called for TLS connections, when the TLS handshake has been completed. More... | |
virtual | ~cCallbacks () |
Callbacks that are used for progress and result reporting.
Definition at line 38 of file UrlClient.h.
|
inlinevirtual |
Definition at line 42 of file UrlClient.h.
|
inlinevirtual |
Called when the next fragment of the response body is received, unless the response is an allowed redirect.
This can be called multiple times, as data arrives over the network.
Reimplemented in cSimpleUrlClientCallbacks, and cFullUrlClientCallbacks.
Definition at line 73 of file UrlClient.h.
|
inlinevirtual |
Called after the response body has been fully reported by OnBody() calls, unless the response is an allowed redirect.
There will be no more OnBody() calls.
Reimplemented in cSimpleUrlClientCallbacks, and cFullUrlClientCallbacks.
Definition at line 77 of file UrlClient.h.
|
inlinevirtual |
Called for TLS connections, when the server certificate is received.
Return true to continue with the request, false to abort. The default implementation does nothing and continues with the request. TODO: The certificate parameter needs a representation!
Reimplemented in cFullUrlClientCallbacks.
Definition at line 51 of file UrlClient.h.
|
inlinevirtual |
Called when the TCP connection is established.
Reimplemented in cFullUrlClientCallbacks.
Definition at line 45 of file UrlClient.h.
|
inlinevirtual |
Called when an asynchronous error is encountered.
Reimplemented in cSimpleUrlClientCallbacks, and cFullUrlClientCallbacks.
Definition at line 80 of file UrlClient.h.
|
inlinevirtual |
Called when a single HTTP header is received and parsed, unless the response is an allowed redirect Called once for each incoming header.
Reimplemented in cSimpleUrlClientCallbacks, and cFullUrlClientCallbacks.
Definition at line 65 of file UrlClient.h.
|
inlinevirtual |
Called when the HTTP headers have been fully parsed, unless the response is an allowed redirect.
There will be no more OnHeader() calls.
Reimplemented in cFullUrlClientCallbacks.
Definition at line 69 of file UrlClient.h.
|
inlinevirtual |
Called when a redirect is to be followed.
This is called even if the redirecting is prohibited by the options; in such an event, this call will be followed by OnError(). If a response indicates a redirect (and the request allows redirecting), the regular callbacks OnStatusLine(), OnHeader(), OnHeadersFinished(), OnBodyData() and OnBodyFinished() are not called for such a response; instead, the redirect is silently attempted.
Reimplemented in cFullUrlClientCallbacks.
Definition at line 88 of file UrlClient.h.
|
inlinevirtual |
Called after the entire request has been sent to the remote peer.
Reimplemented in cFullUrlClientCallbacks.
Definition at line 58 of file UrlClient.h.
|
inlinevirtual |
Called after the first line of the response is parsed, unless the response is an allowed redirect.
Reimplemented in cFullUrlClientCallbacks.
Definition at line 61 of file UrlClient.h.
|
inlinevirtual |
Called for TLS connections, when the TLS handshake has been completed.
An empty default implementation is provided so that clients don't need to reimplement it unless they are interested in the event.
Reimplemented in cFullUrlClientCallbacks.
Definition at line 55 of file UrlClient.h.