WIP: Send LINK command

This commit is contained in:
Tristan B. Kildaire 2021-01-30 11:39:58 +02:00
parent ae93617b79
commit 5021c5038c
1 changed files with 19 additions and 0 deletions

View File

@ -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)
{
}