IP_QueueOpen

IP_QueueOpen — opens a queue for reading or writing.

Syntax

#include <cogent.h>
int IP_QueueOpen(char*  name,
 int  nid,
 int  max_msgs,
 int  mode);

Arguments

name

A queue name.

nid

A node ID on which to open the queue.

max_msgs

The maximum number of messages if creating the queue.

mode

The open mode for the queue.

Returns

A queue ID on success, or -1 on failure and errno is set.

Description

This function opens a queue for reading or writing, as well as possibly creating it. The max_msgs is ignored unless the queue is being created. The possible values for mode are the same as the open modes for the open system call. Typically a queue should be opened for reading or writing, but not both.

See Also

Cascade QueueServer Functions, IP_QueueClose