From 55db5d0bea4aa521f842a99b4516af42a546fa03 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Wed, 22 Feb 2023 07:24:33 +0200 Subject: [PATCH] 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 --- source/conection.d | 14 ++++++++++++++ source/server.d | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 source/conection.d create mode 100644 source/server.d diff --git a/source/conection.d b/source/conection.d new file mode 100644 index 0000000..a6fd3bc --- /dev/null +++ b/source/conection.d @@ -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; + } +} \ No newline at end of file diff --git a/source/server.d b/source/server.d new file mode 100644 index 0000000..47ca253 --- /dev/null +++ b/source/server.d @@ -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 +} \ No newline at end of file