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