Dostupnost ve verzích: PHP 5.0
Open Internet or Unix domain socket connection
| Parametr | Datový typ | Výchozí hodnota | Poznámka |
|---|---|---|---|
$remote_socket |
string |
není | Address to the socket to connect to. |
$errno |
int |
null, | Will be set to the system level error number if connection fails. |
$errstr |
string |
null, | Will be set to the system level error message if the connection fails. |
$timeout |
float |
null, | Number of seconds until the connect() system call should timeout. This parameter only applies when not making asynchronous connection attempts. To set a timeout for reading/writing data over the socket, use the stream_set_timeout, as the timeout only applies while making connecting the socket. |
$flags |
int |
null, | Bitmask field which may be set to any combination of connection flags. Currently the select of connection flags is limited to STREAM_CLIENT_CONNECT (default), STREAM_CLIENT_ASYNC_CONNECT and STREAM_CLIENT_PERSISTENT. |
$context |
resource |
null | A valid context resource created with stream_context_create. |
resource
|bool On success a stream resource is returned which may
be used together with the other file functions (such as
fgets, fgetss,
fwrite, fclose, and
feof), false on failure.
Autor článku pracuje jako seniorní vývojář a software architekt v Praze. Navrhuje a spravuje velké webové aplikace, které znáte a používáte. Od roku 2009 nabral bohaté zkušenosti, které tímto webem předává dál.
Rád vám pomůžu:
Pomohu vám zavést AI do vašeho projektu – od analýzy a návrhu řešení až po nasazení do produkce. Ušetřete čas, zjednodušte procesy a získejte konkurenční výhodu.
Domluvit konzultaciNabízím trénink vývojářů, konzultace, školení a analýzu návrhových vzorů. Osobně v Praze nebo online.
Napište miNejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.