Start of processing packets - implemented PING Responce to Netmail
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
namespace App\Classes;
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use App\Models\Domain;
|
||||
|
||||
abstract class FTN
|
||||
{
|
||||
protected ?Domain $domain; // Domain the packet is from
|
||||
|
||||
public function __get($key)
|
||||
{
|
||||
switch ($key) {
|
||||
@@ -15,7 +17,7 @@ abstract class FTN
|
||||
$this->fn,
|
||||
$this->ff,
|
||||
$this->fp,
|
||||
);
|
||||
).($this->domain ? sprintf('@%s',$this->domain->name) : '');
|
||||
|
||||
case 'tftn':
|
||||
return sprintf('%d:%d/%d.%d',
|
||||
@@ -23,7 +25,7 @@ abstract class FTN
|
||||
$this->tn,
|
||||
$this->tf,
|
||||
$this->tp,
|
||||
);
|
||||
).($this->domain ? sprintf('@%s',$this->domain->name) : '');
|
||||
|
||||
default:
|
||||
throw new \Exception('Unknown key: '.$key);
|
||||
@@ -50,7 +52,7 @@ abstract class FTN
|
||||
* @param array $pack
|
||||
* @return string
|
||||
*/
|
||||
protected function unpackheader(array $pack): string
|
||||
protected static function unpackheader(array $pack): string
|
||||
{
|
||||
return join('/',
|
||||
collect($pack)
|
||||
|
Reference in New Issue
Block a user