downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SAMConnection->peek> <SAMConnection->error
Last updated: Fri, 13 Nov 2009

view this page in

SAMConnection->isConnected

(PECL sam >= 0.1.0)

SAMConnection->isConnected メッセージングサーバとの接続が確立されているかどうかを調べる

説明

SAMConnection
bool isConnected ( void )

接続オブジェクトに対して "isConnected" メソッドをコールすると、 PHP スクリプトがメッセージングサーバと接続されているかどうかを調べます。 このメソッドは、SAMConnection オブジェクトが正常にメッセージングサーバに接続できた場合に TRUE、それ以外の場合に FALSE を返します。 メッセージングサーバとの接続が確立されない限り、 メッセージの送受信はできません。

返り値

このメソッドは、SAMConnection オブジェクトが メッセージングサーバに正しく接続できた場合に TRUE、 それ以外の場合に FALSE を返します。

例1 メッセージングサーバとの接続が存在するかどうかのチェック

<?php

if ($conn->isConnected()) {
  echo 
'接続はアクティブです。';
} else {
  echo 
'アクティブな接続がありません!';
}

?>



add a note add a note User Contributed Notes
SAMConnection->isConnected
There are no user contributed notes for this page.

SAMConnection->peek> <SAMConnection->error
Last updated: Fri, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites