mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-05-18 13:53:35 +02:00
@@ -16,4 +16,5 @@
|
|||||||
{
|
{
|
||||||
const COULD_NOT_CREATE_SOCKET = 1;
|
const COULD_NOT_CREATE_SOCKET = 1;
|
||||||
const NOT_CONNECTED = 2;
|
const NOT_CONNECTED = 2;
|
||||||
|
const CONNECTEON_FALED = 3;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* @author Pavel Djundik <sourcequery@xpaw.me>
|
|
||||||
*
|
|
||||||
* @link https://xpaw.me
|
|
||||||
* @link https://github.com/xPaw/PHP-Source-Query
|
|
||||||
*
|
|
||||||
* @license GNU Lesser General Public License, version 2.1
|
|
||||||
*
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace xPaw\SourceQuery\Exception;
|
|
||||||
|
|
||||||
class TimeoutException extends SourceQueryException
|
|
||||||
{
|
|
||||||
const TIMEOUT_CONNECT = 1;
|
|
||||||
}
|
|
||||||
@@ -537,7 +537,6 @@
|
|||||||
*
|
*
|
||||||
* @throws AuthenticationException
|
* @throws AuthenticationException
|
||||||
* @throws SocketException
|
* @throws SocketException
|
||||||
* @throws TimeoutException
|
|
||||||
*
|
*
|
||||||
* @return bool True on success, false on failure
|
* @return bool True on success, false on failure
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
namespace xPaw\SourceQuery;
|
namespace xPaw\SourceQuery;
|
||||||
|
|
||||||
use xPaw\SourceQuery\Exception\AuthenticationException;
|
use xPaw\SourceQuery\Exception\AuthenticationException;
|
||||||
use xPaw\SourceQuery\Exception\TimeoutException;
|
|
||||||
use xPaw\SourceQuery\Exception\InvalidPacketException;
|
use xPaw\SourceQuery\Exception\InvalidPacketException;
|
||||||
|
use xPaw\SourceQuery\Exception\SocketException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SourceRcon
|
* Class SourceRcon
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
* @package xPaw\SourceQuery
|
* @package xPaw\SourceQuery
|
||||||
*
|
*
|
||||||
* @uses xPaw\SourceQuery\Exception\AuthenticationException
|
* @uses xPaw\SourceQuery\Exception\AuthenticationException
|
||||||
* @uses xPaw\SourceQuery\Exception\TimeoutException
|
|
||||||
* @uses xPaw\SourceQuery\Exception\InvalidPacketException
|
* @uses xPaw\SourceQuery\Exception\InvalidPacketException
|
||||||
|
* @uses xPaw\SourceQuery\Exception\SocketException
|
||||||
*/
|
*/
|
||||||
class SourceRcon
|
class SourceRcon
|
||||||
{
|
{
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
|
|
||||||
if( $ErrNo || !$this->RconSocket )
|
if( $ErrNo || !$this->RconSocket )
|
||||||
{
|
{
|
||||||
throw new TimeoutException( 'Can\'t connect to RCON server: ' . $ErrStr, TimeoutException::TIMEOUT_CONNECT );
|
throw new SocketException( 'Can\'t connect to RCON server: ' . $ErrStr, SocketException::CONNECTEON_FALED );
|
||||||
}
|
}
|
||||||
|
|
||||||
Stream_Set_Timeout( $this->RconSocket, $this->Socket->Timeout );
|
Stream_Set_Timeout( $this->RconSocket, $this->Socket->Timeout );
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
require_once __DIR__ . '/Exception/InvalidArgumentException.php';
|
require_once __DIR__ . '/Exception/InvalidArgumentException.php';
|
||||||
require_once __DIR__ . '/Exception/SocketException.php';
|
require_once __DIR__ . '/Exception/SocketException.php';
|
||||||
require_once __DIR__ . '/Exception/InvalidPacketException.php';
|
require_once __DIR__ . '/Exception/InvalidPacketException.php';
|
||||||
require_once __DIR__ . '/Exception/TimeoutException.php';
|
|
||||||
|
|
||||||
require_once __DIR__ . '/Buffer.php';
|
require_once __DIR__ . '/Buffer.php';
|
||||||
require_once __DIR__ . '/Socket.php';
|
require_once __DIR__ . '/Socket.php';
|
||||||
|
|||||||
Reference in New Issue
Block a user