1
0
mirror of https://github.com/deavminet/dnetd synced 2024-09-21 17:53:39 +02:00

WIP: Send LINK command

This commit is contained in:
Tristan B. Kildaire 2021-01-30 11:39:58 +02:00
parent ae93617b79
commit 5021c5038c

View File

@ -127,6 +127,16 @@ public final class DLink : Thread
/* Initialize a new outbound connection */ /* Initialize a new outbound connection */
initializeOutboundConnection(); 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 */ /* TODO: Implement me */
while(true) 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 public final class DMeyer
{ {
/* Direct peers */ /* Direct peers */
@ -192,3 +203,11 @@ public final class DMeyer
return outboundPeers; return outboundPeers;
} }
} }
/**
* Initializes a new inbound connection that is to be used for linking
*/
void initializeLink(DServer server, DConnection newConnection)
{
}