Removed some old consts

This commit is contained in:
Deon George 2023-07-31 19:14:27 +10:00
parent 7ca6fdc195
commit ccafc6866a
3 changed files with 8 additions and 13 deletions

View File

@ -37,7 +37,7 @@ class CommEMSIReceive extends Command
Log::info('Listening for EMSI connections...'); Log::info('Listening for EMSI connections...');
$o = Setup::findOrFail(config('app.id')); $o = Setup::findOrFail(config('app.id'));
$server = new SocketServer(Setup::EMSI_PORT,Setup::EMSI_BIND); $server = new SocketServer($o->emsi_port,$o->emsi_bind);
$server->handler = [new EMSI($o),'onConnect']; $server->handler = [new EMSI($o),'onConnect'];
try { try {

View File

@ -6,8 +6,7 @@ use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use App\Classes\Protocol\{Binkp,DNS,EMSI}; use App\Classes\Protocol\{Binkp,DNS,EMSI};
use App\Classes\Sock\SocketException; use App\Classes\Sock\{SocketException,SocketServer};
use App\Classes\Sock\SocketServer;
use App\Models\Setup; use App\Models\Setup;
class ServerStart extends Command class ServerStart extends Command
@ -32,7 +31,7 @@ class ServerStart extends Command
* Execute the console command. * Execute the console command.
* *
* @return void * @return void
* @throws \Exception * @throws SocketException
*/ */
public function handle() public function handle()
{ {
@ -51,16 +50,16 @@ class ServerStart extends Command
if ($o->emsi_active) if ($o->emsi_active)
$start->put('emsi',[ $start->put('emsi',[
'address'=>Setup::EMSI_BIND, 'address'=>$o->emsi_bind,
'port'=>Setup::EMSI_PORT, 'port'=>$o->emsi_port,
'proto'=>SOCK_STREAM, 'proto'=>SOCK_STREAM,
'class'=>new EMSI($o), 'class'=>new EMSI($o),
]); ]);
if ($o->dns_active) if ($o->dns_active)
$start->put('dns',[ $start->put('dns',[
'address'=>Setup::DNS_BIND, 'address'=>$o->dns_bind,
'port'=>Setup::DNS_PORT, 'port'=>$o->dns_port,
'proto'=>SOCK_DGRAM, 'proto'=>SOCK_DGRAM,
'class'=>new DNS(), 'class'=>new DNS(),
]); ]);

View File

@ -25,10 +25,6 @@ class Setup extends Model
public const PRODUCT_VERSION_MIN = 0; public const PRODUCT_VERSION_MIN = 0;
public const BIND = '::'; public const BIND = '::';
public const EMSI_PORT = 60179;
public const EMSI_BIND = self::BIND;
public const DNS_PORT = 53;
public const DNS_BIND = '::';
public const O_BINKP = 1<<1; /* Listen for BINKD connections */ public const O_BINKP = 1<<1; /* Listen for BINKD connections */
public const O_EMSI = 1<<2; /* Listen for EMSI connections */ public const O_EMSI = 1<<2; /* Listen for EMSI connections */