Skip to content

Commit

Permalink
documentation updates in class \Swoole\Coroutine\Socket
Browse files Browse the repository at this point in the history
Signed-off-by: Demin Yin <deminy@deminy.net>
  • Loading branch information
deminy committed Dec 1, 2021
1 parent 7b133be commit f9a91d1
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions src/swoole/Swoole/Coroutine/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Swoole\Coroutine;

use Swoole\Client;

class Socket
{
public $fd = -1;
Expand Down Expand Up @@ -209,9 +211,9 @@ public function getOption($level, $opt_name)
}

/**
* @return mixed
* @return bool Returns TRUE if succeed; otherwise FALSE.
*/
public function setProtocol(array $settings)
public function setProtocol(array $settings): bool
{
}

Expand All @@ -225,45 +227,37 @@ public function setOption($level, $opt_name, $opt_value)
{
}

/**
* @return mixed
*/
public function sslHandshake()
public function sslHandshake(): bool
{
}

/**
* @param mixed|null $how
* @return mixed
* @param int $how A Client::SHUT_* constant.
*/
public function shutdown($how = null)
public function shutdown(int $how = Client::SHUT_RDWR): bool
{
}

/**
* @param mixed|null $event
* @return mixed
* @param int $event Must be constant SWOOLE_EVENT_READ or SWOOLE_EVENT_WRITE.
*/
public function cancel($event = null)
public function cancel(int $event = SWOOLE_EVENT_READ): bool
{
}

/**
* @return mixed
*/
public function close()
public function close(): bool
{
}

/**
* @return mixed
* @return array|false If succeeds, return an array with two fields in it: "address" and "port"; otherwise, return FALSE.
*/
public function getpeername()
{
}

/**
* @return mixed
* @return array|false If succeeds, return an array with two fields in it: "address" and "port"; otherwise, return FALSE.
*/
public function getsockname()
{
Expand Down

0 comments on commit f9a91d1

Please sign in to comment.