Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite981997

Browse files
committed
HttpServerUsingTasks is experimental
1 parent77381df commite981997

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎src/dlna/HttpServerUsingTasks.h‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
namespacetiny_dlna {
77

88
/**
9-
* @brief HTTP server implementation that handles each client in a separate
10-
* task.
9+
* @briefExperimentalHTTP server implementation that handles each client in a
10+
*separatetask.
1111
*
1212
* This class extends HttpServer and, upon a new client connection, spawns a
1313
* dedicated Task to handle the client. The task runs until the client
@@ -30,7 +30,7 @@ class HttpServerUsingTasks : public HttpServer<ClientType, ServerType> {
3030

3131
public:
3232
HttpServerUsingTasks(ServerType& server,int bufferSize =1024,
33-
int taskStackSize =4096,int taskPriority =1)
33+
int taskStackSize =1024 *8,int taskPriority =1)
3434
: HttpServer<ClientType, ServerType>(server, bufferSize),
3535
taskStackSize_(taskStackSize),
3636
taskPriority_(taskPriority) {}
@@ -65,6 +65,7 @@ class HttpServerUsingTasks : public HttpServer<ClientType, ServerType> {
6565
Task* clientTask = tasks_.back().get();
6666
clientTask->begin([this, client, clientTask]()mutable {
6767
this->handleClientTask(client);
68+
delay(5);
6869
DlnaLogger.log(DlnaLogLevel::Debug,"Removing client");
6970
});
7071
}

‎src/dlna_config.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77

88
/// Define scheduler run interval in ms
99
#ifndef DLNA_RUN_SCHEDULER_EVERY_MS
10-
#defineDLNA_RUN_SCHEDULER_EVERY_MS20
10+
#defineDLNA_RUN_SCHEDULER_EVERY_MS10
1111
#endif
1212

1313
/// Define subscription publish interval in ms
1414
#ifndef DLNA_RUN_SUBSCRIPTIONS_EVERY_MS
15-
#defineDLNA_RUN_SUBSCRIPTIONS_EVERY_MS20
15+
#defineDLNA_RUN_SUBSCRIPTIONS_EVERY_MS10
1616
#endif
1717

1818
/// Define the default http request timeout
1919
#ifndef DLNA_HTTP_REQUEST_TIMEOUT_MS
20-
#defineDLNA_HTTP_REQUEST_TIMEOUT_MS50
20+
#defineDLNA_HTTP_REQUEST_TIMEOUT_MS60
2121
#endif
2222

2323
/// Define XML parse buffer size

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp