Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Used when the cUrlClient Lua request wants all the callbacks. More...
Public Member Functions | |
cFullUrlClientCallbacks (cLuaState::cTableRefPtr &&a_Callbacks) | |
Creates a new instance bound to the specified table of callbacks. More... | |
virtual void | OnBodyData (const void *a_Data, size_t a_Size) override |
Called when the next fragment of the response body is received, unless the response is an allowed redirect. More... | |
virtual void | OnBodyFinished () override |
Called after the response body has been fully reported by OnBody() calls, unless the response is an allowed redirect. More... | |
virtual bool | OnCertificateReceived () override |
Called for TLS connections, when the server certificate is received. More... | |
virtual void | OnConnected (cTCPLink &a_Link) override |
Called when the TCP connection is established. More... | |
virtual void | OnError (const AString &a_ErrorMsg) override |
Called when an asynchronous error is encountered. More... | |
virtual void | OnHeader (const AString &a_Key, const AString &a_Value) override |
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 () override |
Called when the HTTP headers have been fully parsed, unless the response is an allowed redirect. More... | |
virtual void | OnRedirecting (const AString &a_NewLocation) override |
Called when a redirect is to be followed. More... | |
virtual void | OnRequestSent () override |
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) override |
Called after the first line of the response is parsed, unless the response is an allowed redirect. More... | |
virtual void | OnTlsHandshakeCompleted () override |
Called for TLS connections, when the TLS handshake has been completed. More... | |
Public Member Functions inherited from cUrlClient::cCallbacks | |
virtual | ~cCallbacks () |
Protected Attributes | |
cLuaState::cTableRefPtr | m_Callbacks |
The Lua table containing the callbacks. More... | |
AStringMap | m_Headers |
Accumulator for all the headers to be reported in the OnHeadersFinished() callback. More... | |
Used when the cUrlClient Lua request wants all the callbacks.
Maps each callback onto a Lua function callback in the callback table.
Definition at line 796 of file ManualBindings_Network.cpp.
|
inline |
Creates a new instance bound to the specified table of callbacks.
Definition at line 801 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
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 from cUrlClient::cCallbacks.
Definition at line 855 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
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 from cUrlClient::cCallbacks.
Definition at line 861 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
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 from cUrlClient::cCallbacks.
Definition at line 815 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
Called when the TCP connection is established.
Reimplemented from cUrlClient::cCallbacks.
Definition at line 808 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
Called when an asynchronous error is encountered.
Reimplemented from cUrlClient::cCallbacks.
Definition at line 867 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
Called when a single HTTP header is received and parsed, unless the response is an allowed redirect Called once for each incoming header.
Reimplemented from cUrlClient::cCallbacks.
Definition at line 842 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
Called when the HTTP headers have been fully parsed, unless the response is an allowed redirect.
There will be no more OnHeader() calls.
Reimplemented from cUrlClient::cCallbacks.
Definition at line 849 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
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 from cUrlClient::cCallbacks.
Definition at line 873 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
Called after the entire request has been sent to the remote peer.
Reimplemented from cUrlClient::cCallbacks.
Definition at line 830 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
Called after the first line of the response is parsed, unless the response is an allowed redirect.
Reimplemented from cUrlClient::cCallbacks.
Definition at line 836 of file ManualBindings_Network.cpp.
|
inlineoverridevirtual |
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 from cUrlClient::cCallbacks.
Definition at line 824 of file ManualBindings_Network.cpp.
|
protected |
The Lua table containing the callbacks.
Definition at line 881 of file ManualBindings_Network.cpp.
|
protected |
Accumulator for all the headers to be reported in the OnHeadersFinished() callback.
Definition at line 884 of file ManualBindings_Network.cpp.