I'm trying to include support for telnet in order to allow legacy
clients to connect to my game server -- but it seems that readAllUTF8
doesn't return? I'm at a bit of a loss.
Thanks in advance for any feedback.
I have the following code in my static this()
runTask(() {
listenTCP_s(6969, &initiateTelnet, settings.bindAddresses[0]);//
This blocks, so we need to run it as a task.
});
listenHTTP(settings, router);
And then initiateTelnet processes text based commands in a similar
fashion to the WebSockets handler.
intiateTelnet then does the following:
while(socket.connected)
{
Json JsonMsg;
try
{
auto msg = socket.readAllUTF8();
writefln("Do we ever receive a message?", msg );
mh.handleMessage( msg );
}
catch( Exception ex )
{
writeln(ex.msg);
}
}