ConnectionInterface
in
Table of Contents
Methods
- channel() : Channel
- get free channel
- channels() : Pool|null
- get channels pool
- connect() : void
- 连接
- connection() : AsyncTcpConnection|mixed
- tcp connection
- disconnect() : void
- 关闭连接
- frameSend() : null|bool
- send protocol frame
- getState() : int
- get state
- id() : string
- get id
- masterChannel() : null|Channel
- master channel
- setState() : void
- set state
Methods
channel()
get free channel
public
channel() : Channel
Tags
Return values
Channelchannels()
get channels pool
public
channels() : Pool|null
Return values
Pool|nullconnect()
连接
public
connect() : void
Tags
connection()
tcp connection
public
connection() : AsyncTcpConnection|mixed
Return values
AsyncTcpConnection|mixeddisconnect()
关闭连接
public
disconnect([array{replyCode: int, replyText: string, message: string|null, code: int|null} $options = [] ]) : void
Parameters
- $options : array{replyCode: int, replyText: string, message: string|null, code: int|null} = []
Tags
frameSend()
send protocol frame
public
frameSend(AbstractFrame $frame) : null|bool
Parameters
- $frame : AbstractFrame
Return values
null|boolgetState()
get state
public
getState() : int
Return values
intid()
get id
public
id() : string
Return values
stringmasterChannel()
master channel
public
masterChannel() : null|Channel
Return values
null|ChannelsetState()
set state
public
setState(int $state) : void
Parameters
- $state : int