- Added first member (so `LinkType.init`) `UNSET`

Connection

- Added `linkType` and getter
This commit is contained in:
Tristan B. Velloza Kildaire 2023-11-26 14:09:25 +02:00
parent 8df9c09f43
commit bbcf9b1413
1 changed files with 12 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import std.conv : to;
public enum LinkType
{
UNSET,
USER,
SERVER
}
@ -43,6 +44,12 @@ public class Connection : Thread
private Manager tManager;
private Queue incomingQueue;
/**
* Whether this is a user connection
* or a server link
*/
private LinkType linkType;
private this(Server associatedServer, Stream clientStream)
{
this.associatedServer = associatedServer;
@ -72,6 +79,11 @@ public class Connection : Thread
this.tManager.setDefaultQueue(this.incomingQueue);
}
public LinkType getLinkType()
{
return this.linkType;
}
private void worker()
{
// TODO: Start tristanable manager here