This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-04 17:11:13 +02:00
parent c35d9cf2b6
commit b0b9e6b7ff

View File

@ -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 */