IP_TaskInitAsync

IP_TaskInitAsync — creates a read-only queue.

Syntax

#include <cogent.h>
int IP_TaskInitAsync(IP_Task*  myself,
 char*  qname,
 int  qsize);

Arguments

myself

A task structure referring to the current task.

qname

A queue name.

qsize

The maximum number of messages in the queue, or 0.

Returns

0 on success, or -1 on failure and errno is set.

Description

This function creates a queue of qname and qsize, and opens it as read-only. If qsize is 0, the default of 100 is used. This function also requests notification on the queue for every message in the queue.

See Also

Task Structures, IP_TaskInitAsyncWrites, IP_TaskSendAsync, IP_TaskWaitAsync, IP_TaskCloseAsync