|
Arduino DLNA Server
|
HTTP server implementation that runs in a separate task/thread. More...
#include <HttpServerUsingTask.h>

Public Member Functions | |
| HttpServerUsingTask (ServerType &server, int bufferSize=1024, int taskStackSize=1024 *8, int taskPriority=1) | |
| ~HttpServerUsingTask () | |
| bool | begin () override |
| void | end () override |
| bool | doLoop () override |
| Process server loop. | |
| IPAddress & | localIP () override |
| Provides the local ip address. | |
| void | rewrite (const char *from, const char *to) override |
| adds a rewrite rule | |
| void | on (const char *url, TinyMethodID method, web_callback_fn fn, void *ctx[]=nullptr, int ctxCount=0) override |
| register a generic handler | |
| void | on (const char *url, TinyMethodID method, const char *mime, web_callback_fn fn) override |
| register a handler with mime | |
| void | on (const char *url, TinyMethodID method, const char *mime, const char *result) override |
| register a handler which provides the indicated string | |
| void | on (const char *url, TinyMethodID method, const char *mime, const uint8_t *data, int len) override |
| register a handler which provides the indicated string | |
| void | on (const char *url, TinyMethodID method, Url &redirect) override |
| register a redirection | |
| bool | onRequest (const char *path) override |
| void | addHandler (HttpRequestHandlerLine *handlerLinePtr) |
| adds a new handler | |
| bool | copy () override |
| Call this method from your loop! | |
| operator bool () override | |
| Provides true if the server has been started. | |
| bool | isActive () override |
| const char * | localHost () override |
| Determines the local ip address. | |
| void | setNoConnectDelay (int delay) override |
| void | setReference (void *reference) override |
| Definesa reference/context object. | |
| void * | getReference () override |
| Provides access to a reference/context object. | |
Protected Member Functions | |
| void | removeClosedClients () |
| const char * | nullstr (const char *in) |
| void | processRequest (ClientType *p_client) |
| const char * | resolveRewrite (const char *from) |
| bool | matchesMime (const char *handler_mime, const char *request_mime) |
Protected Attributes | |
| Task | server_task_ |
| List< HttpRequestHandlerLine * > | handler_collection |
| List< HttpRequestRewrite * > | rewrite_collection |
| ListLockFree< ClientType > | open_clients |
| HttpClientHandler< ClientType > | client_handler |
| ListLockFree< ClientType >::Iterator | current_client_iterator |
| ServerType * | server_ptr = nullptr |
| bool | is_active |
| const char * | local_host = nullptr |
| int | no_connect_delay = 5 |
| void * | ref = nullptr |
HTTP server implementation that runs in a separate task/thread.
This class extends HttpServer and manages the server loop in a dedicated task using the Task class. It is templated on the client and server types, allowing flexibility for different network stacks.
| ClientType | The type representing the network client (e.g., WiFiClient). |
| ServerType | The type representing the network server (e.g., WiFiServer). |
Example usage:
|
inline |
|
inline |
|
inlinevirtualinherited |
adds a new handler
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Call this method from your loop!
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Process server loop.
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Provides access to a reference/context object.
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Determines the local ip address.
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Provides the local ip address.
Implements tiny_dlna::IHttpServer.
|
inlineprotectedinherited |
compares mime of handler with mime of request: provides true if they match or one is null (=any value)
|
inlineprotectedinherited |
|
inlineoverridevirtualinherited |
register a handler which provides the indicated string
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
register a handler which provides the indicated string
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
register a handler with mime
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
register a redirection
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
register a generic handler
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
generic handler - you can overwrite this method to provide your specifc processing logic
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Provides true if the server has been started.
Implements tiny_dlna::IHttpServer.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
determiens the potentially rewritten url which should be used for the further processing
|
inlineoverridevirtualinherited |
adds a rewrite rule
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtualinherited |
Definesa reference/context object.
Implements tiny_dlna::IHttpServer.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |