\Swoole\CoroutineServer

Summary

Methods
Properties
Constants
getDefer()
setDefer()
recv()
create()
getuid()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getDefer()

getDefer() : boolean

Returns

boolean

setDefer()

setDefer(boolean  $is_defer = true) 

Parameters

boolean $is_defer

recv()

recv() : mixed

获取延迟收包的结果

Returns

mixed —

当没有进行延迟收包或者收包超时,返回false。

create()

create(callable  $function) 

创新协程

Parameters

callable $function

getuid()

getuid() : string

获取当前协程的ID

Returns

string —

是一个20字节长的随机字符串