previousNet_Socket (Previous) (Next) Net_Socket::disconnect()next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Net_Socket::connect()

Net_Socket::connect() – サーバに接続する

Synopsis

require_once 'Net/Socket.php';

boolean Net_Socket::connect ( string $addr , integer $port , boolean $persistent = = null , integer $timeout = = null , array $options = = null )

Description

指定されたポートに接続します。すでに接続を確立させているときに この関数が呼ばれた場合は、いったん接続を切断し改めて接続しなおします。

Return value

boolean - Returns TRUE on success, PEAR_Error on failure.

Throws

Possible PEAR_Error values
エラー番号 エラーメッセージ 原因 対応方法
every every 接続が確立できませんでした。その理由は、
  • サーバ名あるいは IP アドレスが間違っている

  • ホストがネットワークに接続されていない

  • ファイアウォールによってアクセスが禁止されている

サーバ名をチェックし、ネットワークに接続されていることを確認します。 そして、可能ならファイアウォールの設定を確認します。

Note

This function can not be called statically.

previousNet_Socket (Previous) (Next) Net_Socket::disconnect()next

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.