help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Procedures and functions] Reference for unit 'ipc' (#rtl)

msgrcv

Retrieve a message from the queue

Declaration

Source position: ipc.pp line 306

function msgrcv(

  msqid: cint;

  msgp: PMSGbuf;

  msgsz: size_t;

  msgtyp: cint;

  msgflg: cint

):cint;

Description

msgrcv retrieves a message of type msgtyp from the message queue with ID msqid. msgtyp corresponds to the mtype field of the TMSGbuf record. The message is stored in the MSGbuf structure pointed to by msgp.

The msgflg parameter can be used to control the behaviour of the msgrcv call. It consists of an ORed combination of the following flags:

0
No special meaning.
IPC_NOWAIT
if no messages are available, then the call returns immediatly, with the ENOMSG error.
MSG_NOERROR
If the message size is wrong (too large), no error is generated, instead the message is truncated. Normally, in such cases, the call returns an error (E2BIG)

The function returns True if the message was received correctly, False otherwise.

For an example, see msgctl.

Errors

In case of error, False is returned, and IPCerror is set.

See also

msgget

  

Return message queue ID, possibly creating the queue

msgsnd

  

Send a message to the messague queue

msgctl

  

Perform various operations on a message queue

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505