IP_QueueRead

Cogent API and Utilities: Version 4.1
Prev |  | Next

# `IP_QueueRead`

`IP_QueueRead` -- reads a message from the queue.

## Syntax

``int IP_QueueRead`(int qid, void* msg, int maxlength);`

## Arguments

`qid`

  A queue ID.

`msg`

  A buffer to hold the new message.

`maxlength`

  The maximum length in bytes of `msg`.

## Returns

The number of bytes read on success, or `-1` on failure and `errno` is set.

## Description

This function reads the next available message from the queue specified by `qid`. If no message is available, this function returns immediately. If there is insufficient space to hold the entire message then the result is operating-system dependent. (This will change in future releases).

## See Also

Cascade QueueServer Functions, `IP_QueueWrite`

Prev | Home | Next
`IP_QueueOpen` | Up | `IP_QueueStrerror`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.