mirror of
https://github.com/besterprotocol/besterd
synced 2023-12-13 21:00:32 +01:00
Adding message handling backend
This commit is contained in:
parent
5d66832035
commit
29b01525a1
1 changed files with 15 additions and 1 deletions
|
@ -10,6 +10,12 @@ import std.string;
|
|||
|
||||
public class BesterServer
|
||||
{
|
||||
/**
|
||||
* Message handlers
|
||||
*
|
||||
* Associative array of `payloadType (string)`:`MessageHandler`
|
||||
* TODO: Implement this
|
||||
*/
|
||||
|
||||
/* The server's socket */
|
||||
private Socket serverSocket;
|
||||
|
@ -20,6 +26,13 @@ public class BesterServer
|
|||
initialize(bindAddress, listenPort);
|
||||
}
|
||||
|
||||
|
||||
private void loadHandlers(JSONValue handlerBlock)
|
||||
{
|
||||
/* TODO: Implement me */
|
||||
|
||||
}
|
||||
|
||||
private void initialize(string bindAddress, ushort listenPort)
|
||||
{
|
||||
/* Create a socket */
|
||||
|
@ -135,8 +148,9 @@ private class BesterConnection : Thread
|
|||
{
|
||||
/* TODO: Implement me */
|
||||
debugPrint("Dispatching payload [" ~ payloadType ~ "]");
|
||||
|
||||
debugPrint("Payload: " ~ payload.toPrettyString());
|
||||
|
||||
/* TODO: Lookup the payloadType handler */
|
||||
|
||||
/* TODO: Set return value */
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue