From 3392092131a49dac237ea0dc38d3253ad307e49b Mon Sep 17 00:00:00 2001 From: Deon George Date: Wed, 11 Jan 2023 14:36:31 +1100 Subject: [PATCH] Some comments for binkd --- app/Classes/Protocol/Binkp.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Classes/Protocol/Binkp.php b/app/Classes/Protocol/Binkp.php index 6955769..322f9f4 100644 --- a/app/Classes/Protocol/Binkp.php +++ b/app/Classes/Protocol/Binkp.php @@ -116,6 +116,8 @@ final class Binkp extends BaseProtocol } /** + * BINKD handshake + * * @throws Exception */ private function binkp_hs(): void @@ -298,6 +300,8 @@ final class Binkp extends BaseProtocol } /** + * Receive data from the remote + * * @throws Exception */ private function binkp_recv(): int @@ -1215,9 +1219,11 @@ final class Binkp extends BaseProtocol if ($this->send->total_count && ! $this->send->fd) $this->send->open(); + // We have an open file descriptor, set our mode to send if ($this->send->fd) { $this->sessionSet(self::SE_SENDFILE); + // NR mode, we wait for an M_GET before sending if ($this->setup->opt_nr&self::O_WE) { $this->sessionSet(self::SE_WAITGET); @@ -1229,6 +1235,7 @@ final class Binkp extends BaseProtocol $this->sessionClear(self::SE_SENTEOB); + // We dont have anything to send } else { $this->sessionSet(self::SE_NOFILES); }