/** * Sets the send timeout. * Returns true on success, or false. * @param int $timeout Timeout in milliseconds. * @return boolean */ public function setSendTimeout($timeout) { if (!$this->isOpen()) { self::$defaultSendTimeout = $timeout; } else { $r = socket_set_option($this->socket, SOL_SOCKET, SO_SNDTIMEO, $this->millisecToSolArray($timeout)); return $r; } }