IAC binary
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 40s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m32s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2025-01-30 23:40:50 +11:00
parent 34569f476f
commit 0189b091ab
2 changed files with 29 additions and 2 deletions

View File

@ -943,10 +943,35 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
// Peek for the next 2 chars // Peek for the next 2 chars
do { do {
$iac = $this->client->read(10,1,MSG_PEEK); $iac = $this->client->read(10,1,MSG_PEEK);
$iaccmd = NULL;
switch (ord($iac)) {
case 0x00:
if ($iaccmd === 0xfb) {
Log::debug(sprintf('%s: - IAC WILL BINARY [%02x]',self::LOGKEY,ord($iac)));
// Config with DO
$this->client->send(chr(0xff).chr(0xfd).$iac);
} elseif ($iaccmd === 0xfd) {
Log::debug(sprintf('%s: - IAC DO BINARY [%02x]',self::LOGKEY,ord($iac)));
// Config with WILL
$this->client->send(chr(0xff).chr(0xfb).$iac);
$this->client->iac_bin = true;
}
case 0xfb:
Log::debug(sprintf('%s: - IAC WILL [%02x]',self::LOGKEY,ord($iac)));
$iaccmd = ord($iac);
break;
case 0xfd:
Log::debug(sprintf('%s: - IAC DO [%02x]',self::LOGKEY,ord($iac)));
$iaccmd = ord($iac);
break;
switch ($iac) {
default: default:
Log::debug(sprintf('%s: - IAC [%02x]',self::LOGKEY,$iac)); Log::debug(sprintf('%s: - IAC [%02x]',self::LOGKEY,ord($iac)));
$iac = NULL; $iac = NULL;
} }

View File

@ -197,6 +197,7 @@ final class SocketClient {
return match ($key) { return match ($key) {
'address_remote', 'port_remote' => $this->{$key}, 'address_remote', 'port_remote' => $this->{$key},
'cps', 'speed' => Arr::get($this->session,$key), 'cps', 'speed' => Arr::get($this->session,$key),
'iac_bin' => Arr::get($this->session,$key),
'rx_free' => self::RX_BUF_SIZE-$this->rx_left, 'rx_free' => self::RX_BUF_SIZE-$this->rx_left,
'rx_left' => strlen($this->rx_buf), 'rx_left' => strlen($this->rx_buf),
'tx_free' => self::TX_BUF_SIZE-strlen($this->tx_buf), 'tx_free' => self::TX_BUF_SIZE-strlen($this->tx_buf),
@ -210,6 +211,7 @@ final class SocketClient {
switch ($key) { switch ($key) {
case 'cps': case 'cps':
case 'speed': case 'speed':
case 'iac_bin':
$this->session[$key] = $value; $this->session[$key] = $value;
break; break;