男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

Stomp::__construct

stomp_connect

(PECL stomp >= 0.1.0)

Stomp::__construct -- stomp_connect打開(kāi)一個(gè)連接

說(shuō)明

面向對象風(fēng)格 (constructor):

public Stomp::__construct(
    string $broker = ini_get("stomp.default_broker_uri"),
    string $username = ?,
    string $password = ?,
    array $headers = ?
)

過(guò)程化風(fēng)格:

stomp_connect(
    string $broker = ini_get("stomp.default_broker_uri"),
    string $username = ?,
    string $password = ?,
    array $headers = ?
): resource

打開(kāi)一個(gè)到兼容stomp通訊協(xié)議的消息代理服務(wù)器的連接.

參數

broker

代理服務(wù)器的統一資源標識符(URI)。

username

用戶(hù)名.

password

密碼.

headers

關(guān)聯(lián)數組包含附加的頭信息(例如: receipt)。

返回值

注意:

A transaction header may be specified, indicating that the message acknowledgment should be part of the named transaction.

更新日志

版本 說(shuō)明
1.0.1 增加了headers 參數

范例

示例 #1 面向對象風(fēng)格

<?php

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

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

?>

示例 #2 過(guò)程化風(fēng)格

<?php

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

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

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

?>

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站