php-amqplib

SocketIO extends 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
$sock  : null|resource|Socket
__construct()  : mixed
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
getSocket()  : null|resource|Socket
read()  : string
reenableHeartbeat()  : $this
select()  : int
write()  : mixed
checkBrokerHeartbeat()  : void
do_select()  : int|bool
enable_keepalive()  : void
isPcntlSignalEnabled()  : bool
restoreErrorHandler()  : void
select_write()  : int|bool
setErrorHandler()  : void
Begin tracking errors and set the error handler
throwOnError()  : void
write_heartbeat()  : mixed
Sends a heartbeat message
isIpv6()  : bool

Constants

Properties

$canDispatchPcntlSignal

protected bool $canDispatchPcntlSignal = false

$connection_timeout

protected int|float $connection_timeout

$initial_heartbeat

protected int $initial_heartbeat

$last_error

protected ErrorException|null $last_error

$sock

private null|resource|Socket $sock

Methods

__construct()

public __construct(string $host, int $port[, int|float $read_timeout = 3 ][, bool $keepalive = false ][, int|float|null $write_timeout = null ], int $heartbeat[, null|AMQPConnectionConfig $config = null ]) : mixed
Parameters
$host : string
$port : int
$read_timeout : int|float = 3
$keepalive : bool = false
$write_timeout : int|float|null = null

if null defaults to read timeout

$heartbeat : int

how often to send heartbeat. 0 means off

$config : null|AMQPConnectionConfig = null
Return values
mixed

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
throws
AMQPRuntimeException
Return values
void

close()

public close() : void
Tags
inheritdoc
Return values
void

connect()

Set ups the connection.

public connect() : void
Tags
inheritdoc
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(mixed $errno, mixed $errstr, mixed $errfile, mixed $errline) : void
Parameters
$errno : mixed
$errstr : mixed
$errfile : mixed
$errline : mixed
Tags
inheritdoc
Return values
void

getLastActivity()

public getLastActivity() : float|int
Return values
float|int

getReadTimeout()

public getReadTimeout() : float
Return values
float

getSocket()

public getSocket() : null|resource|Socket
Tags
deprecated
Return values
null|resource|Socket

read()

public read(mixed $len) : string
Parameters
$len : mixed
Tags
inheritdoc
Return values
string

reenableHeartbeat()

public reenableHeartbeat() : $this
Return values
$this

write()

public write(mixed $data) : mixed
Parameters
$data : mixed
Tags
inheritdoc
Return values
mixed

do_select()

protected do_select(int|null $sec, int $usec) : int|bool
Parameters
$sec : int|null
$usec : int
Tags
inheritdoc
Return values
int|bool

isPcntlSignalEnabled()

protected isPcntlSignalEnabled() : bool
Return values
bool

restoreErrorHandler()

protected restoreErrorHandler() : void
Return values
void

select_write()

protected select_write() : int|bool
Return values
int|bool

setErrorHandler()

Begin tracking errors and set the error handler

protected setErrorHandler() : void
Tags
inheritdoc
Return values
void

throwOnError()

protected throwOnError() : void
Return values
void

write_heartbeat()

Sends a heartbeat message

protected write_heartbeat() : mixed
Return values
mixed

isIpv6()

private isIpv6() : bool
Return values
bool

Search results