include/razorback/queue.h File Reference
Queue structures and functions IMPLEMENTS: STOMP PROTOCOL Creative Commons Attribution v2.5 http://stomp.codehaus.org/Protocol.
More...
#include <razorback/visibility.h>
#include <razorback/types.h>
#include <razorback/socket.h>
#include <razorback/lock.h>
Go to the source code of this file.
Data Structures |
struct | Queue |
| Queue an attachment to a distributed message queue. More...
|
Defines |
#define | COMMAND_QUEUE "/topic/COMMAND" |
#define | REQUEST_QUEUE "/queue/REQUEST" |
#define | LOG_QUEUE "/queue/LOG" |
#define | INPUT_QUEUE "/queue/INPUT" |
#define | JUDGMENT_QUEUE "/queue/JUDGMENT" |
#define | QUEUE_FLAG_SEND 0x01 |
#define | QUEUE_FLAG_RECV 0x02 |
Functions |
SO_PUBLIC struct Queue * | Queue_Create (const char *p_sQueueName, int p_iFlags, int mode) |
| Initializes the queue.
|
SO_PUBLIC void | Queue_Terminate (struct Queue *p_pQ) |
| Terminates the queue.
|
SO_PUBLIC struct Message * | Queue_Get (struct Queue *queue) |
| Gets a binary buffer from the queue.
|
SO_PUBLIC bool | Queue_Put_Dest (struct Queue *queue, struct Message *message, char *dest) |
| Puts a binary buffer into the queue.
|
SO_PUBLIC bool | Queue_Put (struct Queue *queue, struct Message *message) |
SO_PUBLIC void | Queue_GetQueueName (const char *p_sLeading, uuid_t p_pId, char *p_sQueueName) |
| Gets a queue name from a uuid_t.
|
Detailed Description
Queue structures and functions IMPLEMENTS: STOMP PROTOCOL Creative Commons Attribution v2.5 http://stomp.codehaus.org/Protocol.
Function Documentation
SO_PUBLIC struct Queue* Queue_Create |
( |
const char * |
p_sQueueName, |
|
|
int |
p_iFlags, |
|
|
int |
mode | |
|
) |
| | [read] |
Initializes the queue.
- Parameters:
-
| *p_sQueueName | the name of the queue |
| *p_bSubscribe | whether you need to read from the queue |
- Returns:
- a pointer to a new Queue Struct or NULL on error.
SO_PUBLIC struct Message* Queue_Get |
( |
struct Queue * |
queue |
) |
[read] |
Gets a binary buffer from the queue.
- Parameters:
-
| p_pQ | the queue |
| p_pBuffer | the binary buffer |
- Returns:
- true if ok, false if error or timeout (errno==EAGAIN if timeout)
SO_PUBLIC void Queue_GetQueueName |
( |
const char * |
p_sLeading, |
|
|
uuid_t |
p_pId, |
|
|
char * |
p_sQueueName | |
|
) |
| | |
Gets a queue name from a uuid_t.
- Parameters:
-
| p_sLeading | the leading text |
| p_pId | the uuid |
| p_sQueueName | the destination text |
SO_PUBLIC bool Queue_Put_Dest |
( |
struct Queue * |
queue, |
|
|
struct Message * |
message, |
|
|
char * |
dest | |
|
) |
| | |
Puts a binary buffer into the queue.
- Parameters:
-
| p_pQueue | the queue |
| p_pBuffer | the binary buffer |
- Returns:
- true if ok, false if error or timeout (errno==EAGAIN if timeout)
SO_PUBLIC void Queue_Terminate |
( |
struct Queue * |
p_pQ |
) |
|
Terminates the queue.
- Parameters:
-
| p_pQ | the queue to terminate |