interface SocketInterface

Methods

void
setSocketOption(SocketOptionInterface $option)

Set the socket options.

getSocketOption()

Get the socket options.

false|int
sendAll(string $data, float $timeout = 0)

Send all data.

false|string
recvAll(int $length = 65536, float $timeout = 0)

Receive the requested amount of data.

false|string
recvPacket(float $timeout = 0)

Receive a packet.

bool
close()

Close the socket.

Details

at line 14
void setSocketOption(SocketOptionInterface $option)

Set the socket options.

Parameters

SocketOptionInterface $option

Return Value

void

at line 19
SocketOptionInterface|null getSocketOption()

Get the socket options.

Return Value

SocketOptionInterface|null

at line 24
false|int sendAll(string $data, float $timeout = 0)

Send all data.

Parameters

string $data
float $timeout

Return Value

false|int

at line 29
false|string recvAll(int $length = 65536, float $timeout = 0)

Receive the requested amount of data.

Parameters

int $length
float $timeout

Return Value

false|string

at line 34
false|string recvPacket(float $timeout = 0)

Receive a packet.

Parameters

float $timeout

Return Value

false|string

at line 39
bool close()

Close the socket.

Return Value

bool