(PHP 5 >= 5.2.0, PHP 7, PECL swoole >= 1.9.0)
��ժҪ
Swoole\Server
{
public addlistener
(
string $host
,
integer $port
,
string $socket_type
) :
void
public after
(
integer $after_time_ms
,
callable $callback
[,
string $param
] ) :
ReturnType
public bind
(
integer $fd
,
integer $uid
) :
boolean
swoole_timer_clear
( integer $timer_id
) : void
public close
(
integer $fd
[,
boolean $reset
] ) :
boolean
public confirm
(
integer $fd
) :
boolean
public connection_list
(
integer $start_fd
[,
integer $pagesize
] ) :
array
public exist
(
integer $fd
) :
boolean
public finish
(
string $data
) :
void
public getClientInfo
(
integer $fd
[,
integer $reactor_id
] ) :
ReturnType
public getClientList
(
integer $start_fd
[,
integer $pagesize
] ) :
array
public listen
(
string $host
,
integer $port
,
string $socket_type
) :
boolean
public on
(
string $event_name
,
callable $callback
) :
void
public pause
(
integer $fd
) :
void
public protect
(
integer $fd
[,
boolean $is_protected
] ) :
void
public reload
(
void
) :
boolean
public resume
(
integer $fd
) :
void
public send
(
integer $fd
,
string $data
[,
integer $reactor_id
] ) :
boolean
public sendfile
(
integer $fd
,
string $filename
[,
integer $offset
] ) :
boolean
public sendMessage
(
integer $worker_id
,
string $data
) :
boolean
public sendto
(
string $ip
,
integer $port
,
string $data
[,
string $server_socket
] ) :
boolean
public sendwait
(
integer $fd
,
string $data
) :
boolean
public set
(
array $settings
) :
ReturnType
public start
(
void
) :
void
public stats
(
void
) :
array
public stop
([
integer $worker_id
] ) :
boolean
public task
(
string $data
[,
integer $dst_worker_id
[,
callable $callback
]] ) :
mixed
public taskwait
(
string $data
[,
float $timeout
[,
integer $worker_id
]] ) :
void
public taskWaitMulti
(
array $tasks
[,
double $timeout_ms
] ) :
void
public tick
(
integer $interval_ms
,
callable $callback
) :
void
}