Queue/Stomp/Client/Connection.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Queue  
Subpackage
Stomp  
Version
$Id$  

\Zend_Queue_Stomp_Client_Connection

Package: Zend_Queue\Stomp
The Stomp client interacts with a Stomp server.
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  READ_TIMEOUT_DEFAULT_USEC = 0
>VConstant  READ_TIMEOUT_DEFAULT_SEC = 5

Properties

>VPropertyprotectedarray $_options
Connection options
Details
Type
array
>VPropertyprotectedresource $_socket = false
tcp/udp socket
Default valuefalseDetails
Type
resource

Methods

methodpublic__destruct() : void

Close the socket explicitly when destructed

methodpubliccanRead() : boolean

Tests the socket to see if there is data for us

Returns
TypeDescription
boolean
methodpublicclose(boolean $destructor = false) : void

Close connection

Parameters
NameTypeDescription
$destructorboolean
methodpubliccreateFrame() : \Zend_Queue_Stomp_FrameInterface

Create an empty frame

Returns
TypeDescription
\Zend_Queue_Stomp_FrameInterface
methodpublicgetFrameClass() : string

Get the frameClass

Returns
TypeDescription
string
methodpublicopen(string $scheme, string $host, int $port, array | array $options = array()) : \true;

open() opens a socket to the Stomp server

Parameters
NameTypeDescription
$schemestring
$hoststring
$portint
$optionsarray | array

('scheme', 'host', 'port')

Returns
TypeDescription
\true;
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicping() : true

Check whether we are connected to the server

Returns
TypeDescription
true
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicread() : \Zend_Queue_Stomp_FrameInterface | false

Reads in a frame from the socket or returns false.

Returns
TypeDescription
\Zend_Queue_Stomp_FrameInterface | false
Throws
ExceptionDescription
\Zend_Queue_Exception
methodpublicsetFrameClass(string $classname) : \$this;

Set the frameClass to be used

This must be a Zend_Queue_Stomp_FrameInterface.
Parameters
NameTypeDescription
$classnamestring
  • class is an instance of Zend_Queue_Stomp_FrameInterface
Returns
TypeDescription
\$this;
methodpublicwrite(\Zend_Queue_Stom_FrameInterface $frame) : \Zend_Queue_Stomp_Client_Connection

Write a frame to the stomp server

example: $response = $client->write($frame)->read();
Parameters
NameTypeDescription
$frame\Zend_Queue_Stom_FrameInterface
Returns
TypeDescription
\Zend_Queue_Stomp_Client_Connection
Details
Fluent
This method is part of a fluent interface and will return the same instance  
Documentation was generated by phpDocumentor 2.2.0 .