Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ send(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

recv(2)

socket(2)



     send(2)                    DG/UX 4.30                     send(2)



     NAME
          send - Send a message from a socket.

     SYNOPSIS
          #include <sys/socket.h>

          int   send  (s, msg, len, user_flags)
          int             s;
          char *          msg;
          int             len;
          int             user_flags;

     PARAMETERS
          s              File descriptor of the socket to send message
                         from.


          msg            Message buffer.


          len            Length of message (in bytes).


          user_flags     Flags to use when sending.

     DESCRIPTION
          Send transmits a message to another socket.  Send may be
          used only when the socket is connected.

          The length of the message is given by the <len> argument.
          If the message is too long to pass atomically through the
          underlying protocol, then the error EMSGSIZE is returned,
          and the message is not transmitted.

          No indication of failure to deliver is implicit in a send.
          Return values of -1 indicate some locally detected errors.

          If no message space is available at the socket to hold the
          message to be transmitted, then send normally blocks, unless
          the socket has been placed in non-blocking I/O mode.  The
          select call determines when you may send more data.

          The <user_flags> parameter may be set to SOF_OOB to send
          out-of-band data on sockets that support this notion (e.g.,
          SOCK_STREAM).

     ACCESS CONTROL
          None.

     RETURN VALUE
          1..<len>       Completed successfully. The call returns the
                         number of characters sent.



     Licensed material--property of copyright holder(s)         Page 1





     send(2)                    DG/UX 4.30                     send(2)



          -1             An error occurred.  Errno is set to indicate
                         the error.

     EXCEPTIONS
          Errno may be set to one of the following error codes:


          EBADF          The argument <s> is not an active valid file
                         descriptor.


          ENOTSOCK       The argument <s> is not a socket.


          EFAULT         An invalid user space address was specified
                         for a parameter.


          EMSGSIZE       The socket requires that message be sent
                         atomically, and the size of the message made
                         this impossible.


          EAGAIN         The socket is marked non-blocking and the
                         requested operation would block.


          EINTR          The send was interrupted by delivery of a
                         signal before any data was delivered.


          ENOTCONN       Tried to send on unconnected socket.


          EOPNOTSUPP     The <flags> argument included the MSG_OOB
                         flag applied to a UDP socket.


          EPIPE          An established connection on a SOCK_STREAM
                         socket was closed by the remote peer.

     SEE ALSO
          The related manual sections:  recv(2), socket(2).












     Licensed material--property of copyright holder(s)         Page 2



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026