Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../../../usr/man/man3c/sendmmsg.3c
Real path: /usr/share/man/man3c/sendmmsg.3c
Zurück
'\" te .\" Copyright (c) 2016, 2021, Oracle and/or its affiliates. .TH sendmmsg 3C "2 Feb 2021" "Oracle Solaris 11.4" "Standard C Library Functions" .SH NAME sendmmsg \- send multiple messages from a socket .SH SYNOPSIS .LP .nf #include <sys/socket.h> \fBint\fR \fBsendmmsg\fR(\fBint\fR \fIs\fR, \fBstruct mmsghdr *\fR\fImsgvec\fR, \fBunsigned int\fR \fIvlen\fR, \fBunsigned int\fR \fIflags\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIs\fR\fR .ad .RS 10n .rt The socket descriptor. For more information, see the \fBsocket\fR(3C) man page. .RE .sp .ne 2 .mk .na \fB\fImsgvec\fR\fR .ad .RS 10n .rt Pointer to an array of \fBmmsghdr\fR structures .RE .sp .ne 2 .mk .na \fB\fIvlen\fR\fR .ad .RS 10n .rt The number of elements in the array of \fBmmsghdr\fR structures .RE .sp .ne 2 .mk .na \fB\fIflags\fR\fR .ad .RS 10n .rt Flags for sending as in the \fBsendmsg\fR(3C) function. .RE .SH DESCRIPTION .sp .LP The \fBsendmmsg()\fR function is an extension to the \fBsendmsg\fR(3C) function that allows the caller to transmit multiple messages on a socket in a single invocation. .sp .LP A blocking \fBsendmmsg()\fR function call blocks until \fIvlen\fR messages have been sent. .sp .LP A non-blocking call sends as many messages as possible, up to \fIvlen\fR, and returns immediately. .sp .LP The \fBmmsghdr\fR structure is defined as: .sp .in +2 .nf struct mmsghdr { struct msghdr msg_hdr; /* Message header */ ssize_t msg_len; /* Number of bytes transmitted */ }; .fi .in -2 .sp .sp .ne 2 .mk .na \fB\fBmsg_hdr\fR\fR .ad .RS 11n .rt \fBmsghdr\fR structure as described in \fBsocket.h\fR(3HEAD) .RE .sp .ne 2 .mk .na \fB\fBmsg_len\fR\fR .ad .RS 11n .rt Is used to return the number of bytes sent from the message in \fBmsg_hdr\fR. This is equivalent to the return value from a single \fBsendmsg()\fR function call. .RE .sp .LP The contents of the \fBmsghdr\fR structure differ depending on whether or not \fB__USE_SUNOS_SOCKETS__\fR is defined before including the \fB<sys/socket.h>\fR header. All source files accessing \fBmsghdr\fR structures or calling the \fBsendmmsg()\fR function must be compiled with either \fB__USE_SUNOS_SOCKETS__\fR defined or all with it undefined \(em mixing and matching will not work. See the \fBsocket.h\fR(3HEAD) manual page for details. .SH RETURN VALUES .sp .LP Upon successful completion, the \fBsendmmsg()\fR function returns the number of messages sent. The number of bytes sent is the arithmetic sum of the \fBmsg_len\fR members of each \fBmmsghdr\fR structure. .sp .LP The functions returns \fB-1\fR if an error occurs and \fBerrno\fR is set to indicate the error. .SH ERRORS .sp .LP Errors are the same as per the \fBsendmsg()\fR function. .sp .LP For more information, see the \fBsendmsg\fR(3C) man page. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level Async-Signal-Safe .TE .sp .SH SEE ALSO .sp .LP \fBfcntl\fR(2), \fBpoll\fR(2), \fBrecvmmsg\fR(3C), \fBselect\fR(3C), \fBsocket\fR(3C), \fBsendmsg\fR(3C), \fBsocket.h\fR(3HEAD), \fBattributes\fR(7) .SH HISTORY .sp .LP The \fBsendmmsg()\fR function was added to Oracle Solaris in the 11.3 SRU 32 release.