SAMConnection::subscribe()

(no version information, might be only in CVS)

SAMConnection::subscribe() --  Create a subscription to one or more topics.

Description

The "subscribe" method is used to create a new subscription to one or more topics.

class SAMConnection {

string subscribe ( string targetTopic )

}

Warning: This method is not currently implemented.

Parameters

targetTopic

The identity of the topic (topic://topicname) to subscribe to.

Return Values

A subscription identifier that can be used in a subsequent receive call as a selector to obtain any topic data or FALSE if an error occurred.

Examples

Example 1. Subscribe to a single topic

<?php
$subid
= $conn->subscribe('topic://A');
if (!
$subid) {
  
// The subscribe failed!
  
echo "Subscribe failed ($conn->errno) $conn->error";
}
?>