diff --git a/source/dnetd/dlink.d b/source/dnetd/dlink.d index dbd96e3..0b00a22 100644 --- a/source/dnetd/dlink.d +++ b/source/dnetd/dlink.d @@ -127,6 +127,16 @@ public final class DLink : Thread /* Initialize a new outbound connection */ initializeOutboundConnection(); + /* TODO: Send LINK (1) command */ + byte[] data; + data ~= [1]; + + /* TODO: Encode [nameLen, name] */ + import tristanable.encoding : DataMessage; + + DataMessage message = new DataMessage(0, [1]); + + /* TODO: Implement me */ while(true) { @@ -156,6 +166,7 @@ public final class DLink : Thread } } +/* TODO: Remove this from here and put it in DServer */ public final class DMeyer { /* Direct peers */ @@ -192,3 +203,11 @@ public final class DMeyer return outboundPeers; } } + +/** +* Initializes a new inbound connection that is to be used for linking +*/ +void initializeLink(DServer server, DConnection newConnection) +{ + +} \ No newline at end of file