mirror of
https://github.com/deavmi/nostril
synced 2024-09-20 01:43:26 +02:00
Testing
This commit is contained in:
parent
c35d9cf2b6
commit
b0b9e6b7ff
@ -65,11 +65,27 @@ public class Server
|
|||||||
router.get("/", this.websocketNegotiater);
|
router.get("/", this.websocketNegotiater);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tcpHandler(TCPConnection tcpClient)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
public void startServer()
|
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
|
// Bind the router to the server
|
||||||
// TODO: Investigate multi-threaded listener rather
|
// TODO: Investigate multi-threaded listener rather
|
||||||
listenHTTP(httpSettings, router);
|
listenHTTP(httpSettings, router);
|
||||||
@ -183,6 +199,8 @@ public class Connection : Fiber
|
|||||||
|
|
||||||
try
|
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();
|
data = socket.receiveText();
|
||||||
}
|
}
|
||||||
/* On connection error or format error */
|
/* On connection error or format error */
|
||||||
|
Loading…
Reference in New Issue
Block a user