Limit to max messages in a packet, currently hard coded to 50

This commit is contained in:
Deon George
2022-12-03 00:22:56 +11:00
parent 170f5c87ed
commit 14349adeab
3 changed files with 41 additions and 5 deletions

View File

@@ -44,6 +44,8 @@ class Setup extends Model
public const PRODUCT_VERSION_MAJ = 0;
public const PRODUCT_VERSION_MIN = 0;
public const MAX_MSGS_PKT = 50;
public const hexdigitslower = '0123456789abcdef';
// Our non model attributes and values
@@ -81,6 +83,9 @@ class Setup extends Model
case 'do_prevent':
return $this->internal[$key] ?? FALSE;
case 'max_msgs_pkt':
return self::MAX_MSGS_PKT;
case 'version':
return File::exists('VERSION') ? chop(File::get('VERSION')) : 'dev';