Net_Socket::setTimeout()
Net_Socket::setTimeout() – sets timeout
Synopsis
require_once 'Net/Socket.php';
boolean Net_Socket::setTimeout (
integer $seconds
, integer $microseconds
)
Описание
Sets the timeout value on socket descriptor, expressed in the sum of seconds and microseconds.
Parameter
-
integer $seconds
- seconds part -
integer $microseconds
- microseconds part
Return value
boolean
- Returns TRUE on success,
PEAR_Error on failure.
Throws
Error code | Error message | Reason | Solution |
---|---|---|---|
NULL | "not connected" | There is no open connection. | You must establish a connection before ( Net_Socket::connect()). |
Замечание
This function can not be called statically.