The HttpSocket class. More...
#include <AsyncFw/HttpSocket>
Public Member Functions | |
| void | stateEvent () override |
| void | activateEvent () override |
| void | readEvent () override |
| void | writeEvent () override |
| void | disconnect () override |
| void | close () override |
| void | destroy () override |
| AsyncFw::DataArrayView | header () |
| AsyncFw::DataArrayView | content () |
| void | sendFile (const std::string &) |
Public Member Functions inherited from AsyncFw::AbstractTlsSocket | |
| void | setDescriptor (int) override |
| bool | connect (const std::string &, uint16_t) override |
| void | setContext (const TlsContext &) const |
Public Member Functions inherited from AsyncFw::AbstractSocket | |
| bool | listen (const std::string &, uint16_t) |
| DataArray & | peek () |
| int | read (uint8_t *, int) |
| DataArray | read (int=0) |
| int | write (const uint8_t *, int) |
| int | write (const DataArray &) |
| Error | error () const |
| std::string | errorString () const |
| Thread * | thread () const |
| std::string | address () const |
| uint16_t | port () const |
| std::string | peerAddress () const |
| uint16_t | peerPort () const |
Public Member Functions inherited from AsyncFw::AnyData | |
| template<typename T> | |
| T | data () const |
| AnyData (const std::any &) | |
| std::any & | data () const |
| void | setData (const std::any &data) const |
Static Public Member Functions | |
| static HttpSocket * | create (AsyncFw::Thread *_t=nullptr) |
Public Attributes | |
| AsyncFw::FunctionConnectorProtected< HttpSocket >::Connector< const AsyncFw::AbstractSocket::State > | stateChanged |
| AsyncFw::FunctionConnectorProtected< HttpSocket >::Connector< const AsyncFw::DataArray & > | received |
| AsyncFw::FunctionConnectorProtected< HttpSocket >::Connector<> | writeContent |
| AsyncFw::FunctionConnectorProtected< HttpSocket >::Connector< int > | progress |
Protected Member Functions | |
| void | clearReceived () |
Protected Member Functions inherited from AsyncFw::AbstractTlsSocket | |
| virtual void | activateReady () |
| int | read_available_fd () const override final |
| int | read_fd (void *_p, int _s) override final |
| int | write_fd (const void *_p, int _s) override final |
Protected Member Functions inherited from AsyncFw::AbstractSocket | |
| AbstractSocket (int, int, int) | |
| int | pendingRead () const |
| int | pendingWrite () const |
| void | setError (Error) |
| void | setErrorString (const std::string &) const |
| virtual void | incomingEvent () |
Protected Attributes | |
| bool | connectionClose = false |
Protected Attributes inherited from AsyncFw::AbstractSocket | |
| Thread * | thread_ |
| int | fd_ = -1 |
| State | state_ = State::Unconnected |
Protected Attributes inherited from AsyncFw::AnyData | |
| std::any | data_ |
Friends | |
| LogStream & | operator<< (LogStream &log, const HttpSocket &s) |
Additional Inherited Members | |
Public Types inherited from AsyncFw::AbstractTlsSocket | |
| enum | IgnoreErrors : uint8_t { TimeValidity = 0x01 } |
Public Types inherited from AsyncFw::AbstractSocket | |
| enum | State : uint8_t { Unconnected , Listening , Connecting , Connected , Active , Closing , Destroy } |
| enum | Error : uint8_t { None , Closed , Refused , Read , Write , Activate } |
The HttpSocket class.
Example:
|
overridevirtual |
Reimplemented from AsyncFw::AbstractSocket.
|
overridevirtual |
Reimplemented from AsyncFw::AbstractTlsSocket.
|
overridevirtual |
Reimplemented from AsyncFw::AbstractSocket.
|
overridevirtual |
Reimplemented from AsyncFw::AbstractSocket.
|
overridevirtual |
Reimplemented from AsyncFw::AbstractTlsSocket.
|
overridevirtual |
Reimplemented from AsyncFw::AbstractTlsSocket.
|
overridevirtual |
Reimplemented from AsyncFw::AbstractSocket.