|
ofxHTTP
A collection of tools for HTTP.
|
Public Member Functions | |
| BaseConnection_ (RouteType &route) | |
| Create a BaseConnection_. More... | |
| virtual | ~BaseConnection_ () |
| Destroy the BaseConnection_. | |
| void | handleRequest (ServerEventArgs &evt) override |
| Handle the ServerEventArgs. More... | |
| void | stop () override |
| Interrupt the handleRequest method if possible. | |
| bool | send (const FrameType &frame) const |
| Queue data to be sent to the client. More... | |
| Poco::Net::NameValueCollection | requestHeaders () const |
| Poco::Net::SocketAddress | clientAddress () const |
| bool | isConnected () const |
| std::size_t | sendQueueSize () const |
| void | clearSendQueue () |
| Clears the send queue. | |
| std::size_t | totalBytesSent () const |
| Get the total bytes sent to the client. More... | |
Public Member Functions inherited from ofx::HTTP::BaseRouteHandler_< RouteType > | |
| BaseRouteHandler_ (RouteType &route) | |
| Create a BaseRoute. | |
| virtual | ~BaseRouteHandler_ () |
| Destroy a BaseRoute. | |
| void | handleRequest (Poco::Net::HTTPServerRequest &request, Poco::Net::HTTPServerResponse &response) override |
| RouteType & | route () |
| Get the dispatching route. | |
Public Member Functions inherited from ofx::HTTP::AbstractRouteHandler | |
| virtual | ~AbstractRouteHandler () |
| Destroy the AbstractRouteHandler instance. | |
Public Member Functions inherited from ofx::HTTP::AbstractHTTPRequestHandler | |
| virtual | ~AbstractHTTPRequestHandler () |
| Destroy the AbstractHTTPRequestHandler. | |
Public Member Functions inherited from ofx::HTTP::AbstractServerEventRequestHandler | |
| virtual | ~AbstractServerEventRequestHandler () |
| Destroy the AbstractServerEventRequestHandler. | |
Protected Attributes | |
| Poco::Net::NameValueCollection | _requestHeaders |
| The original request headers for reference. | |
| Poco::Net::SocketAddress | _clientAddress |
| The client's SocketAddress for reference. | |
| bool | _isConnected = false |
| True iff the BaseConnection_ is connected to a client. | |
| std::size_t | _totalBytesSent = 0 |
| The total number of bytes sent to the client. | |
| std::queue< FrameType > | _frameQueue |
| A queue of the SSEFrames scheduled for delivery. | |
| std::mutex | _mutex |
| A mutex for threadsafe access to the frame queue, etc. | |
Protected Attributes inherited from ofx::HTTP::BaseRouteHandler_< RouteType > | |
| RouteType & | _route |
| The route. | |
| ofx::HTTP::BaseConnection_< RouteType, FrameType >::BaseConnection_ | ( | RouteType & | route | ) |
Create a BaseConnection_.
| route | A reference to the parent route. |
| Poco::Net::SocketAddress ofx::HTTP::BaseConnection_< RouteType, FrameType >::clientAddress | ( | ) | const |
|
overridevirtual |
Handle the ServerEventArgs.
| evt | The server request event. |
Implements ofx::HTTP::BaseRouteHandler_< RouteType >.
| bool ofx::HTTP::BaseConnection_< RouteType, FrameType >::isConnected | ( | ) | const |
| Poco::Net::NameValueCollection ofx::HTTP::BaseConnection_< RouteType, FrameType >::requestHeaders | ( | ) | const |
| bool ofx::HTTP::BaseConnection_< RouteType, FrameType >::send | ( | const FrameType & | frame | ) | const |
Queue data to be sent to the client.
| frame | The data to send to the client. |
| cache | True if the frame should be cached. |
| std::size_t ofx::HTTP::BaseConnection_< RouteType, FrameType >::sendQueueSize | ( | ) | const |
| std::size_t ofx::HTTP::BaseConnection_< RouteType, FrameType >::totalBytesSent | ( | ) | const |
Get the total bytes sent to the client.