Updated for transport v1.8

This commit is contained in:
Andrew Lalis 2025-08-09 21:56:28 -04:00
parent aa699d15dd
commit 2d393d9961
3 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,7 @@
"copyright": "Copyright © 2025, Andrew Lalis",
"dependencies": {
"handy-http-primitives": "~>1.8",
"handy-http-transport": "~>1.6",
"handy-http-transport": "~>1.8",
"handy-http-data": "~>1.2",
"handy-http-websockets": "~>1.2",
"handy-http-handlers": "~>1.0",

View File

@ -3,10 +3,10 @@
"versions": {
"asdf": "0.7.17",
"dxml": "0.4.4",
"handy-http-data": "1.2.0",
"handy-http-handlers": "1.0.0",
"handy-http-primitives": "1.8.0",
"handy-http-transport": "1.6.0",
"handy-http-data": "1.3.0",
"handy-http-handlers": "1.1.0",
"handy-http-primitives": "1.8.1",
"handy-http-transport": "1.8.0",
"handy-http-websockets": "1.2.0",
"mir-algorithm": "3.22.4",
"mir-core": "1.7.3",

View File

@ -14,7 +14,11 @@ public import handy_http_handlers;
* port = The port to host the server on. Defaults to 8080.
*/
void startServer(HttpRequestHandler handler, ushort port = 8080) {
HttpTransport tp = new TaskPoolHttp1Transport(handler, port);
HttpTransport tp = new TaskPoolHttp1Transport(handler, Http1TransportConfig(
defaultConfig().host,
port,
defaultConfig().workerCount
));
tp.start();
}