Updated readme, updated epoll.
Build and Test Module / build-and-test (push) Successful in 11s Details
Build and Test Module / integration-tests (push) Successful in 17s Details

This commit is contained in:
Andrew Lalis 2025-06-29 16:42:25 -04:00
parent fd42b11c8b
commit ae1194e159
2 changed files with 8 additions and 11 deletions

View File

@ -26,7 +26,7 @@ class MyHandler : HttpRequestHandler {
} }
void main() { void main() {
HttpTransport tp = new Http1Transport(new MyHandler(), 8080); HttpTransport tp = new TaskPoolHttp1Transport(new MyHandler(), 8080);
tp.start(); tp.start();
} }
``` ```

View File

@ -13,17 +13,18 @@ extern(C) {
} }
import handy_http_transport.interfaces; import handy_http_transport.interfaces;
import handy_http_transport.http1;
import handy_http_primitives;
import slf4d; import slf4d;
class Http1EpollTransport : HttpTransport { class Http1EpollTransport : Http1Transport {
private immutable ushort port;
this(ushort port) { this(HttpRequestHandler requestHandler, ushort port) {
this.port = port; super(requestHandler, port);
} }
void start() { override void start() {
super.start();
// Create the server socket. // Create the server socket.
enum SOCK_NONBLOCK = 0x4000; enum SOCK_NONBLOCK = 0x4000;
int listenFd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); int listenFd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0);
@ -118,8 +119,4 @@ class Http1EpollTransport : HttpTransport {
} }
} }
} }
void stop() {
}
} }