LinkType
- Added first member (so `LinkType.init`) `UNSET` Connection - Added `linkType` and getter
This commit is contained in:
parent
8df9c09f43
commit
bbcf9b1413
|
@ -22,6 +22,7 @@ import std.conv : to;
|
||||||
|
|
||||||
public enum LinkType
|
public enum LinkType
|
||||||
{
|
{
|
||||||
|
UNSET,
|
||||||
USER,
|
USER,
|
||||||
SERVER
|
SERVER
|
||||||
}
|
}
|
||||||
|
@ -43,6 +44,12 @@ public class Connection : Thread
|
||||||
private Manager tManager;
|
private Manager tManager;
|
||||||
private Queue incomingQueue;
|
private Queue incomingQueue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether this is a user connection
|
||||||
|
* or a server link
|
||||||
|
*/
|
||||||
|
private LinkType linkType;
|
||||||
|
|
||||||
private this(Server associatedServer, Stream clientStream)
|
private this(Server associatedServer, Stream clientStream)
|
||||||
{
|
{
|
||||||
this.associatedServer = associatedServer;
|
this.associatedServer = associatedServer;
|
||||||
|
@ -72,6 +79,11 @@ public class Connection : Thread
|
||||||
this.tManager.setDefaultQueue(this.incomingQueue);
|
this.tManager.setDefaultQueue(this.incomingQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LinkType getLinkType()
|
||||||
|
{
|
||||||
|
return this.linkType;
|
||||||
|
}
|
||||||
|
|
||||||
private void worker()
|
private void worker()
|
||||||
{
|
{
|
||||||
// TODO: Start tristanable manager here
|
// TODO: Start tristanable manager here
|
||||||
|
|
Loading…
Reference in New Issue