PHP 8.3.4 Released!

Stomp::getReadTimeout

stomp_get_read_timeout

(PECL stomp >= 0.3.0)

Stomp::getReadTimeout -- stomp_get_read_timeoutGets read timeout

説明

オブジェクト指向型 (method):

public Stomp::getReadTimeout(): array

手続き型:

stomp_get_read_timeout(resource $link): array

Gets read timeout

パラメータ

link

手続き型のみ: stomp_connect() が返す stomp リンク ID。

戻り値

Returns an array with 2 elements: sec and usec.

例1 オブジェクト指向型

<?php

/* connection */
try {
$stomp = new Stomp('tcp://localhost:61613');
} catch(
StompException $e) {
die(
'Connection failed: ' . $e->getMessage());
}

var_dump($stomp->getReadTimeout());

/* close connection */
unset($stomp);

?>

上の例の出力は、 たとえば以下のようになります。

array(2) {
  ["sec"]=>
  int(2)
  ["usec"]=>
  int(0)
}

例2 手続き型

<?php

/* connection */
$link = stomp_connect('ssl://localhost:61612');

/* check connection */
if (!$link) {
die(
'Connection failed: ' . stomp_connect_error());
}

var_dump(stomp_get_read_timeout($link));

/* close connection */
stomp_close($link);

?>

上の例の出力は、 たとえば以下のようになります。

array(2) {
  ["sec"]=>
  int(2)
  ["usec"]=>
  int(0)
}

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top