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

@@ -6,7 +6,6 @@ use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use App\Classes\Protocol as BaseProtocol;
use App\Classes\Sock\SocketClient;
use App\Models\{Address,Domain,Mailer};
/**
@@ -64,22 +63,6 @@ final class DNS extends BaseProtocol
public const DNS_TYPE_OPT = 41; // OPT Records
public const DNS_TYPE_DS = 43; // DS Records (Delegation signer RFC 4034)
public function onConnect(SocketClient $client): ?int
{
// If our parent returns a PID, we've forked
if (! parent::onConnect($client)) {
Log::withContext(['pid'=>getmypid()]);
$this->client = $client;
$this->protocol_session();
Log::debug(sprintf('%s:= onConnect - Connection closed [%s]',self::LOGKEY,$client->address_remote));
exit(0);
}
return NULL;
}
protected function protocol_init(): int
{
// N/A