diff --git a/source/nostril/server.d b/source/nostril/server.d index f649402..3eb63e2 100644 --- a/source/nostril/server.d +++ b/source/nostril/server.d @@ -65,11 +65,27 @@ public class Server router.get("/", this.websocketNegotiater); } + private void tcpHandler(TCPConnection tcpClient) + { + + } + /** * TODO */ public void startServer() { + import eventcore.socket; + import std.socket; + // StreamListenSocket servSock = listenStream(parseAddress("[::]", 8082)); + + + // TCPListenOptions d; + + // TCPListener serverSocket = listenTCP(httpSettings.port, &tcpHandler, httpSettings.bindAddresses[0]); + + + // Bind the router to the server // TODO: Investigate multi-threaded listener rather listenHTTP(httpSettings, router); @@ -183,6 +199,8 @@ public class Connection : Fiber try { + // TODO: We could juist cal, this (I presume - I must check) + // ... that this is async I/O fiber vibe (then no need for yield() at end) data = socket.receiveText(); } /* On connection error or format error */