AbstractIO
in package
Table of Contents
- BUFFER_SIZE = 8192
- $canDispatchPcntlSignal : bool
- $config : null|AMQPConnectionConfig
- $connection_timeout : int|float
- $heartbeat : int
- $host : string
- $initial_heartbeat : int
- $keepalive : bool
- $last_error : ErrorException|null
- $last_read : int|float
- $last_write : int|float
- $port : int
- $read_timeout : float
- $write_timeout : float
- afterTune() : void
- Set connection params connection tune(negotiation).
- check_heartbeat() : void
- Heartbeat logic: check connection health here
- close() : void
- connect() : void
- Set ups the connection.
- disableHeartbeat() : $this
- error_handler() : void
- Internal error handler to deal with stream and socket errors.
- getLastActivity() : float|int
- getReadTimeout() : float
- read() : string
- reenableHeartbeat() : $this
- select() : int
- write() : mixed
- checkBrokerHeartbeat() : void
- do_select() : int|bool
- isPcntlSignalEnabled() : bool
- restoreErrorHandler() : void
- setErrorHandler() : void
- Begin tracking errors and set the error handler
- throwOnError() : void
- write_heartbeat() : mixed
- Sends a heartbeat message
Constants
BUFFER_SIZE
public
mixed
BUFFER_SIZE
= 8192
Properties
$canDispatchPcntlSignal
protected
bool
$canDispatchPcntlSignal
= false
$config
protected
null|AMQPConnectionConfig
$config
$connection_timeout
protected
int|float
$connection_timeout
$heartbeat
protected
int
$heartbeat
$host
protected
string
$host
$initial_heartbeat
protected
int
$initial_heartbeat
$keepalive
protected
bool
$keepalive
$last_error
protected
ErrorException|null
$last_error
$last_read
protected
int|float
$last_read
$last_write
protected
int|float
$last_write
$port
protected
int
$port
$read_timeout
protected
float
$read_timeout
$write_timeout
protected
float
$write_timeout
Methods
afterTune()
Set connection params connection tune(negotiation).
public
afterTune(int $heartbeat) : void
Parameters
- $heartbeat : int
Return values
void —check_heartbeat()
Heartbeat logic: check connection health here
public
check_heartbeat() : void
Tags
Return values
void —close()
public
abstract close() : void
Return values
void —connect()
Set ups the connection.
public
abstract connect() : void
Tags
Return values
void —disableHeartbeat()
public
disableHeartbeat() : $this
Return values
$this —error_handler()
Internal error handler to deal with stream and socket errors.
public
error_handler(int $errno, string $errstr, string $errfile, int $errline) : void
Parameters
- $errno : int
- $errstr : string
- $errfile : string
- $errline : int
Return values
void —getLastActivity()
public
getLastActivity() : float|int
Return values
float|int —getReadTimeout()
public
getReadTimeout() : float
Return values
float —read()
public
abstract read(int $len) : string
Parameters
- $len : int
Tags
Return values
string —reenableHeartbeat()
public
reenableHeartbeat() : $this
Return values
$this —select()
public
select(int|null $sec, int $usec) : int
Parameters
- $sec : int|null
- $usec : int
Tags
Return values
int —write()
public
abstract write(string $data) : mixed
Parameters
- $data : string
Tags
Return values
mixed —checkBrokerHeartbeat()
protected
checkBrokerHeartbeat() : void
Tags
Return values
void —do_select()
protected
abstract do_select(int|null $sec, int $usec) : int|bool
Parameters
- $sec : int|null
- $usec : int
Tags
Return values
int|bool —isPcntlSignalEnabled()
protected
isPcntlSignalEnabled() : bool
Return values
bool —restoreErrorHandler()
protected
restoreErrorHandler() : void
Return values
void —setErrorHandler()
Begin tracking errors and set the error handler
protected
setErrorHandler() : void
Return values
void —throwOnError()
protected
throwOnError() : void
Return values
void —write_heartbeat()
Sends a heartbeat message
protected
write_heartbeat() : mixed