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