mirror of
https://github.com/deavminet/dnetd
synced 2024-09-21 17:53:39 +02:00
Fixed out of range error
This commit is contained in:
parent
068636cde7
commit
67088afaa2
@ -389,6 +389,8 @@ public class DConnection : Thread
|
|||||||
/* Set the type of this connection to `server` */
|
/* Set the type of this connection to `server` */
|
||||||
connType = ConnectionType.SERVER;
|
connType = ConnectionType.SERVER;
|
||||||
hasAuthed = true;
|
hasAuthed = true;
|
||||||
|
|
||||||
|
reply ~= [0]; // Testing for now
|
||||||
}
|
}
|
||||||
/* If `register` command (requires: unauthed, client) */
|
/* If `register` command (requires: unauthed, client) */
|
||||||
else if(command == Command.REGISTER && !hasAuthed && connType == ConnectionType.CLIENT)
|
else if(command == Command.REGISTER && !hasAuthed && connType == ConnectionType.CLIENT)
|
||||||
|
@ -168,7 +168,9 @@ public final class DLink : Thread
|
|||||||
|
|
||||||
/* TODO: Await an acknowledgement [status] */
|
/* TODO: Await an acknowledgement [status] */
|
||||||
byte[] receivedResponseBytes;
|
byte[] receivedResponseBytes;
|
||||||
bReceiveMessage(outboundSocket, receivedResponseBytes);
|
bool recvStatus = bReceiveMessage(outboundSocket, receivedResponseBytes);
|
||||||
|
gprintln("Recev status: "~to!(string)(recvStatus), DebugType.WARNING);
|
||||||
|
|
||||||
DataMessage receivedResponse = DataMessage.decode(receivedResponseBytes);
|
DataMessage receivedResponse = DataMessage.decode(receivedResponseBytes);
|
||||||
|
|
||||||
ubyte[] dataReply = cast(ubyte[])receivedResponse.getData();
|
ubyte[] dataReply = cast(ubyte[])receivedResponse.getData();
|
||||||
|
Loading…
Reference in New Issue
Block a user