Updated for transport v1.8
This commit is contained in:
parent
aa699d15dd
commit
2d393d9961
2
dub.json
2
dub.json
|
@ -5,7 +5,7 @@
|
||||||
"copyright": "Copyright © 2025, Andrew Lalis",
|
"copyright": "Copyright © 2025, Andrew Lalis",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"handy-http-primitives": "~>1.8",
|
"handy-http-primitives": "~>1.8",
|
||||||
"handy-http-transport": "~>1.6",
|
"handy-http-transport": "~>1.8",
|
||||||
"handy-http-data": "~>1.2",
|
"handy-http-data": "~>1.2",
|
||||||
"handy-http-websockets": "~>1.2",
|
"handy-http-websockets": "~>1.2",
|
||||||
"handy-http-handlers": "~>1.0",
|
"handy-http-handlers": "~>1.0",
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
"versions": {
|
"versions": {
|
||||||
"asdf": "0.7.17",
|
"asdf": "0.7.17",
|
||||||
"dxml": "0.4.4",
|
"dxml": "0.4.4",
|
||||||
"handy-http-data": "1.2.0",
|
"handy-http-data": "1.3.0",
|
||||||
"handy-http-handlers": "1.0.0",
|
"handy-http-handlers": "1.1.0",
|
||||||
"handy-http-primitives": "1.8.0",
|
"handy-http-primitives": "1.8.1",
|
||||||
"handy-http-transport": "1.6.0",
|
"handy-http-transport": "1.8.0",
|
||||||
"handy-http-websockets": "1.2.0",
|
"handy-http-websockets": "1.2.0",
|
||||||
"mir-algorithm": "3.22.4",
|
"mir-algorithm": "3.22.4",
|
||||||
"mir-core": "1.7.3",
|
"mir-core": "1.7.3",
|
||||||
|
|
|
@ -14,7 +14,11 @@ public import handy_http_handlers;
|
||||||
* port = The port to host the server on. Defaults to 8080.
|
* port = The port to host the server on. Defaults to 8080.
|
||||||
*/
|
*/
|
||||||
void startServer(HttpRequestHandler handler, ushort port = 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();
|
tp.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue