|
Arduino DLNA Server
|
Header-only HTTP server wrapper that registers callback handlers. More...
#include <HttpServer.h>

Public Member Functions | |
| HttpServer (ServerType &server, int bufferSize=1024) | |
| ~HttpServer () override | |
| IPAddress & | localIP () override |
| Provides the local ip address. | |
| bool | begin () override |
| Starts the server. | |
| void | end () override |
| stops the server_ptr | |
| 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 | doLoop () override |
| Legacy method: same as copy();. | |
| 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 | |
| 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 |
Header-only HTTP server wrapper that registers callback handlers.
This server is templated so you can provide the concrete Arduino networking classes that back the transport. ClientType is the socket implementation accepted from the server (for example WiFiClient or EthernetClient) and ServerType is the listener type (for example WiFiServer). Default template arguments keep the legacy WiFi behaviour intact, while custom transports can swap in their own client/server types.
| ClientType | Arduino client class accepted from the listener (e.g. WiFiClient, EthernetClient). |
| ServerType | Arduino server/listener class that produces ClientType instances (e.g. WiFiServer, EthernetServer). |
|
inline |
|
inlineoverride |
|
inlinevirtual |
adds a new handler
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Starts the server.
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Call this method from your loop!
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Legacy method: same as copy();.
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
stops the server_ptr
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Provides access to a reference/context object.
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Determines the local ip address.
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Provides the local ip address.
Implements tiny_dlna::IHttpServer.
|
inlineprotected |
compares mime of handler with mime of request: provides true if they match or one is null (=any value)
|
inlineprotected |
|
inlineoverridevirtual |
register a handler which provides the indicated string
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
register a handler which provides the indicated string
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
register a handler with mime
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
register a redirection
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
register a generic handler
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
generic handler - you can overwrite this method to provide your specifc processing logic
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Provides true if the server has been started.
Implements tiny_dlna::IHttpServer.
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
determiens the potentially rewritten url which should be used for the further processing
|
inlineoverridevirtual |
adds a rewrite rule
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Implements tiny_dlna::IHttpServer.
|
inlineoverridevirtual |
Definesa reference/context object.
Implements tiny_dlna::IHttpServer.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |