Remove CommProtocolReceive commands, Remove protocol onConnect() functions, pass Setup::class to protocols
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user