Some BINKP optimisation, implemented crypt, implemented receiving compressed transfers

This commit is contained in:
2023-07-02 23:40:08 +10:00
parent f9f9fb5345
commit 6f298d778f
28 changed files with 1614 additions and 904 deletions

View File

@@ -30,13 +30,15 @@ class CommBinkpReceive extends Command
* Execute the console command.
*
* @return mixed
* @throws SocketException
*/
public function handle()
{
Log::info('Listening for BINKP connections...');
$o = Setup::findOrFail(config('app.id'));
$server = new SocketServer(Setup::BINKP_PORT,Setup::BINKP_BIND);
$server->setConnectionHandler([new Binkp(Setup::findOrFail(config('app.id'))),'onConnect']);
$server = new SocketServer($o->binkp_port,$o->binkp_bind);
$server->handler = [new Binkp($o),'onConnect'];
try {
$server->listen();

View File

@@ -32,7 +32,7 @@ class CommBinkpSend extends Command
*/
public function handle(): void
{
Log::info('Call BINKP send');
Log::info('CBS:- Call BINKP send');
$ao = Address::findFTN($this->argument('ftn'));
if (! $ao)

View File

@@ -30,13 +30,15 @@ class CommEMSIReceive extends Command
* Execute the console command.
*
* @return mixed
* @throws \Exception
*/
public function handle()
{
Log::info('Listening for EMSI connections...');
$o = Setup::findOrFail(config('app.id'));
$server = new SocketServer(Setup::EMSI_PORT,Setup::EMSI_BIND);
$server->setConnectionHandler([new EMSI(Setup::findOrFail(config('app.id'))),'onConnect']);
$server->handler = [new EMSI($o),'onConnect'];
try {
$server->listen();

View File

@@ -29,13 +29,14 @@ class CommZmodemReceive extends Command
* Execute the console command.
*
* @return mixed
* @throws SocketException
*/
public function handle()
{
Log::info('Listening for ZMODEM connections...');
$server = new SocketServer(60177,'0.0.0.0');
$server->setConnectionHandler([new ZmodemClass,'onConnect']);
$server->handler = [new ZmodemClass,'onConnect'];
try {
$server->listen();

View File

@@ -43,8 +43,8 @@ class ServerStart extends Command
if ($o->optionGet(Setup::O_BINKP))
$start->put('binkp',[
'address'=>Setup::BINKP_BIND,
'port'=>Setup::BINKP_PORT,
'address'=>$o->binkp_bind,
'port'=>$o->binkp_port,
'proto'=>SOCK_STREAM,
'class'=>new Binkp($o),
]);
@@ -90,7 +90,7 @@ class ServerStart extends Command
Log::info(sprintf('%s: - Started [%s]',self::LOGKEY,$item));
$server = new SocketServer($config['port'],$config['address'],$config['proto']);
$server->setConnectionHandler([$config['class'],'onConnect']);
$server->handler = [$config['class'],'onConnect'];
try {
$server->listen();