sendmmsg(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

sendmmsg(3c)

Standard C Library Functions                                      sendmmsg(3C)



NAME
       sendmmsg - send multiple messages from a socket

SYNOPSIS
       #include <sys/socket.h>

       int sendmmsg(int s, struct mmsghdr *msgvec, unsigned int vlen,
            unsigned int flags);

PARAMETERS
       s         The   socket   descriptor.  For  more  information,  see  the
                 socket(3C) man page.


       msgvec    Pointer to an array of mmsghdr structures


       vlen      The number of elements in the array of mmsghdr structures


       flags     Flags for sending as in the sendmsg(3C) function.


DESCRIPTION
       The sendmmsg() function is an extension  to  the  sendmsg(3C)  function
       that  allows  the caller to transmit multiple messages on a socket in a
       single invocation.


       A blocking sendmmsg() function call blocks  until  vlen  messages  have
       been sent.


       A non-blocking call sends as many messages as possible, up to vlen, and
       returns immediately.


       The mmsghdr structure is defined as:

         struct mmsghdr {
             struct msghdr   msg_hdr;  /* Message header */
             ssize_t         msg_len;  /* Number of bytes transmitted */
         };


       msg_hdr    msghdr structure as described in socket.h(3HEAD)


       msg_len    Is used to return the number of bytes sent from the  message
                  in  msg_hdr.  This  is equivalent to the return value from a
                  single sendmsg() function call.



       The contents of the msghdr structure differ depending on whether or not
       __USE_SUNOS_SOCKETS__  is  defined  before including the <sys/socket.h>
       header. All source files accessing msghdr  structures  or  calling  the
       sendmmsg()  function must be compiled with either __USE_SUNOS_SOCKETS__
       defined or all with it undefined — mixing and matching will  not  work.
       See the socket.h(3HEAD) manual page for details.

RETURN VALUES
       Upon  successful completion, the sendmmsg() function returns the number
       of messages sent. The number of bytes sent is the arithmetic sum of the
       msg_len members of each mmsghdr structure.


       The  functions  returns -1 if an error occurs and errno is set to indi‐
       cate the error.

ERRORS
       Errors are the same as per the sendmsg() function.


       For more information, see the sendmsg(3C) man page.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE  VALUE  _  Interface StabilityCommitted _ MT-LevelAsync-Signal-
       Safe


SEE ALSO
       fcntl(2), poll(2), recvmmsg(3C), select(3C),  socket(3C),  sendmsg(3C),
       socket.h(3HEAD), attributes(7)

HISTORY
       The  sendmmsg() function was added to Oracle Solaris in the 11.3 SRU 32
       release.



Oracle Solaris 11.4               2 Feb 2021                      sendmmsg(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3