Integrate Mailer::class into System_Log::class, removed Zmodem Server/Client

This commit is contained in:
2023-12-10 19:07:53 +11:00
parent 8fc0336314
commit 0526500ff0
10 changed files with 71 additions and 139 deletions

View File

@@ -9,7 +9,7 @@ use App\Classes\Protocol as BaseProtocol;
use App\Classes\Sock\SocketClient;
use App\Classes\Sock\SocketException;
use App\Exceptions\InvalidFTNException;
use App\Models\{Address,Setup};
use App\Models\{Address,Mailer,Setup};
use App\Interfaces\CRC as CRCInterface;
use App\Interfaces\Zmodem as ZmodemInterface;
use App\Traits\CRC as CRCTrait;
@@ -88,7 +88,6 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
* @param SocketClient $client
* @return int|null
* @throws SocketException
* @throws \Exception
*/
public function onConnect(SocketClient $client): ?int
{
@@ -96,8 +95,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
if (! parent::onConnect($client)) {
Log::withContext(['pid'=>getmypid()]);
// @todo Can this be SESSION_EMSI? if so, set an object class value that in EMSI of SESSION_EMSI, and move this method to the parent class
$this->session(self::SESSION_AUTO,$client,(new Address));
$this->session(Mailer::where('name','EMSI')->singleOrFail(),$client,(new Address));
$this->client->close();
exit(0);
}