Static Public Member Functions |
static | test () |
Detailed Description
Definition at line 33 of file zmsg.php.
Constructor & Destructor Documentation
zmsg::__construct |
( |
|
$socket = null | ) |
|
Constructor, accepts optional socket for sending/receiving.
- Parameters
-
Definition at line 54 of file zmsg.php.
Member Function Documentation
Dump the contents to a string, for debugging and tracing.
- Returns
- string
Definition at line 293 of file zmsg.php.
Return the address of the message
- Returns
- void
- Author
- Ian Barber
Definition at line 243 of file zmsg.php.
Return the body
- Returns
- string
Definition at line 180 of file zmsg.php.
Set message body using printf format
- Returns
- void
Definition at line 207 of file zmsg.php.
Set message body to provided string.
- Parameters
-
- Returns
- Zmsg
Definition at line 191 of file zmsg.php.
Return the last part of the message
- Returns
- string
Definition at line 160 of file zmsg.php.
Load a message saved with the save function
- Parameters
-
- Returns
- this
Definition at line 407 of file zmsg.php.
Report size of message
- Returns
- int
Definition at line 150 of file zmsg.php.
Pop message part off front of message parts
- Returns
- string
- Author
- Ian Barber
Definition at line 232 of file zmsg.php.
Push message part to front
- Parameters
-
- Returns
- void
Definition at line 221 of file zmsg.php.
Receive message from socket Creates a new message and returns it Blocks on recv if socket is not ready for input
- Exceptions
-
Exception | if no socket present |
- Returns
- Zmsg
Definition at line 103 of file zmsg.php.
zmsg::s_decode_uuid |
( |
|
$data | ) |
|
Format the hex string back into a packed int.
- Parameters
-
- Returns
- string
Definition at line 77 of file zmsg.php.
zmsg::s_encode_uuid |
( |
|
$data | ) |
|
Formats 17-byte UUID as 33-char string starting with '@' Lets us print UUIDs as C strings and use them as addresses
- Parameters
-
- Returns
- string
Definition at line 66 of file zmsg.php.
Save a msg to a file
- Parameters
-
- Returns
- this
Definition at line 389 of file zmsg.php.
zmsg::send |
( |
|
$clear = true | ) |
|
Send message to socket. Destroys message after sending.
- Exceptions
-
Exception | if no socket present |
- Parameters
-
- Returns
- Zmsg
Definition at line 126 of file zmsg.php.
Set the last part of the message
- Parameters
-
Definition at line 170 of file zmsg.php.
zmsg::set_socket |
( |
ZMQSocket |
$socket | ) |
|
Set the internal socket to use for sending or receiving.
- Parameters
-
- Returns
- Zmsg
Definition at line 88 of file zmsg.php.
Run a self test of the Zmsg class.
- Returns
- boolean
- Todo:
- See if assert returns
Definition at line 314 of file zmsg.php.
Unwraps outer message envelope and returns address Discards empty message part after address, if any
- Returns
- void
- Author
- Ian Barber
Definition at line 278 of file zmsg.php.
zmsg::wrap |
( |
|
$address, |
|
|
|
$delim = null |
|
) |
| |
Wraps message in new address envelope. If delim is not null, creates two part envelope.
- Parameters
-
string | $address | |
string | $delim | |
- Returns
- void
Definition at line 258 of file zmsg.php.
Member Data Documentation
The documentation for this class was generated from the following file: