Connection

- This stub class is to represent a new connection from a client

Server

- This stub class is to represent a server which holds connections

BackingStore

- Abstract type representing the storage for saving and retrieving events
This commit is contained in:
Tristan B. Velloza Kildaire 2023-02-22 07:24:33 +02:00
parent 3fc2c491a7
commit 55db5d0bea
2 changed files with 50 additions and 0 deletions

14
source/conection.d Normal file
View File

@ -0,0 +1,14 @@
module nostril.conection;
import vibe.vibe : WebSocket;
public class Connection
{
/* Client socket */
private WebSocket ws;
this(WebSocket ws)
{
this.ws = ws;
}
}

36
source/server.d Normal file
View File

@ -0,0 +1,36 @@
module nostril.server;
import vibe.vibe : URLRouter;
public class Server
{
private URLRouter router;
private this()
{
}
public static Server createServer()
{
Server newServer;
return newServer;
}
}
/**
* BackingStore
*
* Represents the backing storage where
* events are to be read from and written
* to
*/
public abstract class BackingStore
{
// TODO: Add a queue here
}