改名
This commit is contained in:
@@ -48,11 +48,10 @@ class HTTPServerListener extends Abstracts\Server
|
|||||||
* UDPServerListener constructor.
|
* UDPServerListener constructor.
|
||||||
* @param Server|Port $server
|
* @param Server|Port $server
|
||||||
* @param array|null $settings
|
* @param array|null $settings
|
||||||
* @return Server\Port
|
* @return Server|Port
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function bindCallback(Server|Port $server, ?array $settings = []): Server\Port
|
public function bindCallback(Server|Port $server, ?array $settings = []): Server|Port
|
||||||
{
|
{
|
||||||
$this->setEvents(Constant::CONNECT, $settings['events'][Constant::CONNECT] ?? null);
|
$this->setEvents(Constant::CONNECT, $settings['events'][Constant::CONNECT] ?? null);
|
||||||
|
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ class TCPServerListener extends Abstracts\Server
|
|||||||
* UDPServerListener constructor.
|
* UDPServerListener constructor.
|
||||||
* @param Server|Port $server
|
* @param Server|Port $server
|
||||||
* @param array|null $settings
|
* @param array|null $settings
|
||||||
* @return Port
|
* @return Server|Port
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function bindCallback(Server|Port $server, ?array $settings = []): Port
|
public function bindCallback(Server|Port $server, ?array $settings = []): Server|Port
|
||||||
{
|
{
|
||||||
$this->setEvents(Constant::CLOSE, $settings['events'][Constant::CLOSE] ?? null);
|
$this->setEvents(Constant::CLOSE, $settings['events'][Constant::CLOSE] ?? null);
|
||||||
$this->setEvents(Constant::RECEIVE, $settings['events'][Constant::RECEIVE] ?? null);
|
$this->setEvents(Constant::RECEIVE, $settings['events'][Constant::RECEIVE] ?? null);
|
||||||
|
|||||||
@@ -24,17 +24,12 @@ class UDPServerListener extends Abstracts\Server
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Server $server
|
* @param Server|Port $server
|
||||||
* @param string $host
|
|
||||||
* @param int $port
|
|
||||||
* @param int $mode
|
|
||||||
* @param array|null $settings
|
* @param array|null $settings
|
||||||
* @return Server\Port
|
* @return Server|Port
|
||||||
* @throws NotFindClassException
|
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function bindCallback(Server|Port $server, ?array $settings = []): Server\Port
|
public function bindCallback(Server|Port $server, ?array $settings = []): Server|Port
|
||||||
{
|
{
|
||||||
$this->setEvents(Constant::PACKET, $settings['events'][Constant::PACKET] ?? null);
|
$this->setEvents(Constant::PACKET, $settings['events'][Constant::PACKET] ?? null);
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ class WebSocketServerListener extends Abstracts\Server
|
|||||||
/**
|
/**
|
||||||
* @param mixed $server
|
* @param mixed $server
|
||||||
* @param array|null $settings
|
* @param array|null $settings
|
||||||
* @return Server\Port
|
* @return Port|Server
|
||||||
* @throws ReflectionException
|
|
||||||
* @throws NotFindClassException
|
* @throws NotFindClassException
|
||||||
|
* @throws ReflectionException
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function bindCallback(Server|Port $server, ?array $settings = []): Server\Port
|
public function bindCallback(Server|Port $server, ?array $settings = []): Server|Port
|
||||||
{
|
{
|
||||||
$this->setEvents(Constant::CONNECT, $settings['events'][Constant::CONNECT] ?? null);
|
$this->setEvents(Constant::CONNECT, $settings['events'][Constant::CONNECT] ?? null);
|
||||||
$this->setEvents(Constant::HANDSHAKE, $settings['events'][Constant::HANDSHAKE] ?? null);
|
$this->setEvents(Constant::HANDSHAKE, $settings['events'][Constant::HANDSHAKE] ?? null);
|
||||||
|
|||||||
Reference in New Issue
Block a user