Remove CommProtocolReceive commands, Remove protocol onConnect() functions, pass Setup::class to protocols

This commit is contained in:
2024-11-09 08:58:09 +11:00
parent 72ad1307c5
commit bf3fce252d
10 changed files with 31 additions and 203 deletions

View File

@@ -7,7 +7,6 @@ use Illuminate\Support\Facades\Log;
use App\Classes\Protocol as BaseProtocol;
use App\Classes\Sock\Exception\SocketException;
use App\Classes\Sock\SocketClient;
use App\Exceptions\InvalidFTNException;
use App\Interfaces\CRC as CRCInterface;
use App\Interfaces\Zmodem as ZmodemInterface;
@@ -82,27 +81,6 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
'1'=>self::P_ZMODEM,
];
/**
* Incoming EMSI session
*
* @param SocketClient $client
* @return int|null
* @throws SocketException
*/
public function onConnect(SocketClient $client): ?int
{
// If our parent returns a PID, we've forked
if (! parent::onConnect($client)) {
Log::withContext(['pid'=>getmypid()]);
$this->session($client,(new Address));
$this->client->close();
exit(0);
}
return NULL;
}
/**
* Send our welcome banner
*