Net_Socket::setTimeout()

Net_Socket::setTimeout() – タイムアウトを設定する

Synopsis

require_once 'Net/Socket.php';

boolean Net_Socket::setTimeout ( integer $seconds , integer $microseconds )

Description

ソケット記述子にタイムアウト値を設定します。 秒とマイクロ秒であらわした値の合計が設定されます。

Parameter

  • integer $seconds - 秒の部分。

  • integer $microseconds - マイクロ秒の部分。

Return value

boolean - Returns TRUE on success, PEAR_Error on failure.

Throws

Possible PEAR_Error values
エラー番号 エラーメッセージ 原因 対応方法
NULL "not connected" 接続が確立されていません。 まず接続を確立しなければなりません( Net_Socket::connect())。

Note

This function can not be called statically.