Rename BINKD to BINKP

This commit is contained in:
Deon George 2021-07-02 23:44:01 +10:00
parent 64fd264427
commit d56681a187
6 changed files with 15 additions and 14 deletions

View File

@ -14,7 +14,7 @@ use App\Classes\Sock\SocketClient;
use App\Classes\Sock\SocketException; use App\Classes\Sock\SocketException;
use App\Models\Address; use App\Models\Address;
final class Binkd extends BaseProtocol final class Binkp extends BaseProtocol
{ {
/* -- */ /* -- */
private const BP_PROT = 'binkp'; /* protocol text */ private const BP_PROT = 'binkp'; /* protocol text */
@ -591,7 +591,7 @@ final class Binkd extends BaseProtocol
$rc = 0; $rc = 0;
while(($rem_aka = $this->strsep($buf,' '))) { while(($rem_aka = $this->strsep($buf,' '))) {
Log::debug(sprintf('%s: - Parsing AKA [%s]',__METHOD__,$rem_aka)); Log::info(sprintf('%s: - Parsing AKA [%s]',__METHOD__,$rem_aka));
try { try {
if (! ($o = Address::findFTN($rem_aka))) { if (! ($o = Address::findFTN($rem_aka))) {

View File

@ -5,7 +5,7 @@ namespace App\Console\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use App\Classes\Protocol\Binkd as BinkdClass; use App\Classes\Protocol\Binkp;
use App\Classes\Sock\SocketException; use App\Classes\Sock\SocketException;
use App\Classes\Sock\SocketServer; use App\Classes\Sock\SocketServer;
use App\Models\Setup; use App\Models\Setup;
@ -36,7 +36,7 @@ class BinkpReceive extends Command
Log::info('Listening for BINKP connections...'); Log::info('Listening for BINKP connections...');
$server = new SocketServer(Setup::BINKP_PORT,Setup::BINKP_BIND); $server = new SocketServer(Setup::BINKP_PORT,Setup::BINKP_BIND);
$server->setConnectionHandler([new BinkdClass(Setup::findOrFail(config('app.id'))),'onConnect']); $server->setConnectionHandler([new Binkp(Setup::findOrFail(config('app.id'))),'onConnect']);
try { try {
$server->listen(); $server->listen();

View File

@ -6,7 +6,7 @@ use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use App\Classes\Protocol\Binkd as BinkdClass; use App\Classes\Protocol\Binkp;
use App\Classes\Sock\SocketClient; use App\Classes\Sock\SocketClient;
use App\Models\{Address,Setup}; use App\Models\{Address,Setup};
@ -31,6 +31,7 @@ class BinkpSend extends Command
* *
* @return mixed * @return mixed
* @throws \App\Classes\Sock\SocketException * @throws \App\Classes\Sock\SocketException
* @throws \Exception
*/ */
public function handle() public function handle()
{ {
@ -48,8 +49,8 @@ class BinkpSend extends Command
$client = SocketClient::create($no->system->mailer_address,$no->system->mailer_port); $client = SocketClient::create($no->system->mailer_address,$no->system->mailer_port);
$o = new BinkdClass(Setup::findOrFail(config('app.id'))); $o = new Binkp(Setup::findOrFail(config('app.id')));
$o->session(BinkdClass::SESSION_BINKP,$client,$no); $o->session(Binkp::SESSION_BINKP,$client,$no);
Log::info(sprintf('Connection ended: %s',$client->getAddress()),['m'=>__METHOD__]); Log::info(sprintf('Connection ended: %s',$client->getAddress()),['m'=>__METHOD__]);
} }

View File

@ -5,7 +5,7 @@ namespace App\Console\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use App\Classes\Protocol\EMSI as EMSIClass; use App\Classes\Protocol\EMSI;
use App\Classes\Sock\SocketException; use App\Classes\Sock\SocketException;
use App\Classes\Sock\SocketServer; use App\Classes\Sock\SocketServer;
use App\Models\Setup; use App\Models\Setup;
@ -36,7 +36,7 @@ class EMSIReceive extends Command
Log::info('Listening for EMSI connections...'); Log::info('Listening for EMSI connections...');
$server = new SocketServer(Setup::EMSI_PORT,Setup::EMSI_BIND); $server = new SocketServer(Setup::EMSI_PORT,Setup::EMSI_BIND);
$server->setConnectionHandler([new EMSIClass(Setup::findOrFail(config('app.id'))),'onConnect']); $server->setConnectionHandler([new EMSI(Setup::findOrFail(config('app.id'))),'onConnect']);
try { try {
$server->listen(); $server->listen();

View File

@ -6,7 +6,7 @@ use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use App\Classes\Protocol\EMSI as EMSIClass; use App\Classes\Protocol\EMSI;
use App\Classes\Sock\SocketClient; use App\Classes\Sock\SocketClient;
use App\Models\{Address,Setup}; use App\Models\{Address,Setup};
@ -48,8 +48,8 @@ class EMSISend extends Command
$client = SocketClient::create($no->system->mailer_address,$no->system->mailer_port,38400); $client = SocketClient::create($no->system->mailer_address,$no->system->mailer_port,38400);
$o = new EMSIClass(Setup::findOrFail(config('app.id'))); $o = new EMSI(Setup::findOrFail(config('app.id')));
$o->session(EMSIClass::SESSION_AUTO,$client,$no); $o->session(EMSI::SESSION_AUTO,$client,$no);
Log::info(sprintf('Connection ended: %s',$client->getAddress()),['m'=>__METHOD__]); Log::info(sprintf('Connection ended: %s',$client->getAddress()),['m'=>__METHOD__]);
} }

View File

@ -5,7 +5,7 @@ namespace App\Console\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use App\Classes\Protocol\{Binkd,EMSI}; use App\Classes\Protocol\{Binkp,EMSI};
use App\Classes\Sock\SocketException; use App\Classes\Sock\SocketException;
use App\Classes\Sock\SocketServer; use App\Classes\Sock\SocketServer;
use App\Models\Setup; use App\Models\Setup;
@ -46,7 +46,7 @@ class StartServer extends Command
'binkp' => [ 'binkp' => [
'address'=>Setup::BINKP_BIND, 'address'=>Setup::BINKP_BIND,
'port'=>Setup::BINKP_PORT, 'port'=>Setup::BINKP_PORT,
'class'=>new Binkd($o), 'class'=>new Binkp($o),
], ],
]; ];