Initial commit

This commit is contained in:
2024-09-13 14:11:34 +02:00
commit a14f7077bb
31 changed files with 1901 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace Pdahal\Xmpp\Exceptions;
use Exception;
class DeadSocket extends Exception
{
public function __construct()
{
$errorCode = socket_last_error();
$errorMsg = socket_strerror($errorCode);
parent::__construct("Couldn't create socket: [$errorCode] $errorMsg");
}
}

View File

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
namespace Pdahal\Xmpp\Exceptions;
use Exception;
class StreamError extends Exception
{
public function __construct(string $streamErrorType)
{
parent::__construct("Unrecoverable stream error ({$streamErrorType}), trying to reconnect...");
}
}