VSTa manual pages  - MSG_SEND (2)

NAME

msg_send - send messages to a server’s port

CONTENTS

Synopsis
Description

SYNOPSIS

#include <sys/msg.h>
int msg_send(port_t port, struct msg *msg);

DESCRIPTION

msg_send() queues a message containing zero or more message buffers to the server connected to port, which must have previously been opened by a successful call to msg_connect(). By convention, the m_arg field of the msg contains the number of bytes contained in the message. m_nseg specifies how many segments of memory are being sent. The actual segments are filled into the m_seg[] array.

msg_send() blocks until the server has received the message and completed it via msg_reply(), msg_err(), or by terminating.

The treatment of the described segments of memory is determined by the M_READ bit in the m_op field of the message. If this bit is clear, the requested operation is to send the described memory to the server. If set, the server does not receive the memory, and the server’s reply will be filled into the message segments.

The return value will either be -1, indicating an error, or the number of bytes transferred.


MSG_SEND (2)
Generated by manServer 1.06 from msg_send.2 using man macros.