You are here

protected function SocketHandler::streamSetTimeout in Lagoon Logs 8

Wrapper to allow mocking

See also

http://php.net/manual/en/function.stream-set-timeout.php

1 call to SocketHandler::streamSetTimeout()
SocketHandler::setSocketTimeout in src/Logger/SocketHandler.php

File

src/Logger/SocketHandler.php, line 245

Class

SocketHandler
Stores to any socket - uses fsockopen() or pfsockopen().

Namespace

Drupal\lagoon_logs\Logger

Code

protected function streamSetTimeout() {
  $seconds = floor($this->timeout);
  $microseconds = round(($this->timeout - $seconds) * 1000000.0);
  return stream_set_timeout($this->resource, $seconds, $microseconds);
}