The Swoole\Server class
(PECL swoole >= 1.9.0)
类摘要
Swoole\Server
{
public addlistener
(
string $host
,
int $port
,
string $socket_type
) :
void
public after
(
int $after_time_ms
,
callable $callback
,
string $param
= ?
) :
ReturnType
public bind
(
int $fd
,
int $uid
) :
bool
swoole_timer_clear
( int $timer_id
) : void
public close
(
int $fd
,
bool $reset
= ?
) :
bool
public exist
(
int $fd
) :
bool
public finish
(
string $data
) :
void
public getClientInfo
(
int $fd
,
int $reactor_id
= ?
,
bool $ignore_error
= ?
) :
array
public getClientList
(
int $start_fd
,
int $pagesize
= ?
) :
array
public listen
(
string $host
,
int $port
,
string $socket_type
) :
bool
public on
(
string $event_name
,
callable $callback
) :
void
public pause
(
int $fd
) :
void
public protect
(
int $fd
,
bool $is_protected
= ?
) :
void
public resume
(
int $fd
) :
void
public send
(
int $fd
,
string $data
,
int $reactor_id
= ?
) :
bool
public sendfile
(
int $fd
,
string $filename
,
int $offset
= ?
) :
bool
public sendMessage
(
int $worker_id
,
string $data
) :
bool
public sendto
(
string $ip
,
int $port
,
string $data
,
string $server_socket
= ?
) :
bool
public sendwait
(
int $fd
,
string $data
) :
bool
public set
(
array $settings
) :
ReturnType
public stop
(
int $worker_id
= ?
) :
bool
public task
(
string $data
,
int $dst_worker_id
= ?
,
callable $callback
= ?
) :
mixed
public taskwait
(
string $data
,
float $timeout
= ?
,
int $worker_id
= ?
) :
void
public taskWaitMulti
(
array $tasks
,
double $timeout_ms
= ?
) :
void
public tick
(
int $interval_ms
,
callable $callback
) :
void
}
Table of Contents
User Contributed Notes
There are no user contributed notes for this page.