From e10a7d5b3eb790b4bcbe0fe444cddfb65e7da010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20=F0=9F=85=B1=2E=20Kildaire?= <21629986@sun.ac.za> Date: Wed, 23 Sep 2020 11:20:09 +0200 Subject: [PATCH] Save the tag for future use when sending replies --- source/dnetd/dconnection.d | 15 ++++++++++++++- source/dnetd/dserver.d | 4 +++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/source/dnetd/dconnection.d b/source/dnetd/dconnection.d index 21063f2..af52ae5 100644 --- a/source/dnetd/dconnection.d +++ b/source/dnetd/dconnection.d @@ -85,6 +85,9 @@ public class DConnection : Thread */ private void process(DataMessage message) { + /* Get the tag */ + long tag = message.tag; + /* Get the command byte */ byte commandByte = message.data[0]; @@ -106,7 +109,17 @@ public class DConnection : Thread /* TODO: Handle this case */ else { - + /* TODO: Check plugins */ + bool isPlugin = false; + + if(isPlugin) + { + + } + else + { + + } } } diff --git a/source/dnetd/dserver.d b/source/dnetd/dserver.d index 3548467..4c55fa2 100644 --- a/source/dnetd/dserver.d +++ b/source/dnetd/dserver.d @@ -23,7 +23,9 @@ public class DServer : Thread private Address sockAddress; - /* Connection queue */ + /** + * Connection queue + */ private DConnection[] connectionQueue; this(Address sockAddress)