WowaEl
WowaEl

Reputation: 1

How do I set the socket timeout in PHP?

I need to set timeout on client.recv in TCP server.

Upvotes: 0

Views: 445

Answers (1)

Galen
Galen

Reputation: 30170

last parameter of fsockopen

resource fsockopen  (  string $hostname  [,  int $port = -1  [,  int &$errno  [,  string &$errstr  [,  float $timeout = ini_get("default_socket_timeout")  ]]]] )

Upvotes: 1

Related Questions