BINKP responding to incoming netmail pings
This commit is contained in:
@@ -55,11 +55,13 @@ class Packet extends FTNBase
|
||||
|
||||
public File $file; // Packet filename
|
||||
public Collection $messages; // Messages in the Packet
|
||||
private string $name; // Packet name
|
||||
|
||||
public function __construct(Address $o=NULL)
|
||||
{
|
||||
$this->messages = collect();
|
||||
$this->domain = NULL;
|
||||
$this->name = sprintf('%08x',Carbon::now()->timestamp);
|
||||
|
||||
// If we are creating an outbound packet, we need to set our header
|
||||
if ($o)
|
||||
@@ -95,6 +97,7 @@ class Packet extends FTNBase
|
||||
throw new InvalidPacketException('Not a type 2 packet: '.$version);
|
||||
|
||||
$o = new self;
|
||||
$o->name = (string)$file;
|
||||
$o->header = unpack(self::unpackheader(self::v2header),$header);
|
||||
|
||||
$x = fread($f,2);
|
||||
@@ -217,6 +220,10 @@ class Packet extends FTNBase
|
||||
else
|
||||
return '2e';
|
||||
|
||||
// Packet name:
|
||||
case 'name':
|
||||
return $this->{$key};
|
||||
|
||||
default:
|
||||
throw new \Exception('Unknown key: '.$key);
|
||||
}
|
||||
|
Reference in New Issue
Block a user