Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sendto(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

recv(2)

socket(2)



     sendto(2)                  DG/UX 4.30                   sendto(2)



     NAME
          sendto - Send a message from a socket.

     SYNOPSIS
          #include <sys/socket.h>

          int   sendto  (s, msg, len, user_flags, to, tolen)
          int             s;
          char *          msg;
          int             len;
          int             user_flags;
          struct sockaddr *to;
          int             tolen;

     PARAMETERS
          s              File descriptor of socket to send message
                         from.


          msg            Message buffer.


          len            Length of message (in bytes).


          user_flags     Flags to use when sending.


          to             Name of destination.


          tolen          Length of destination name in bytes.

     DESCRIPTION
          This call sends a message, as does send.  However, sendto
          has arguments that specify the destination of the message.

          The address of the destination is given by the to argument
          with tolen specifying its size.  When used with a connected
          socket, the <to> and <tolen> arguments are ignored.  Other
          arguments are the same as for send.

     ACCESS CONTROL
          None.

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


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



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





     sendto(2)                  DG/UX 4.30                   sendto(2)



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


          EBADF          The argument <s> is not an active valid
                         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.


          EISCONN        Can't sendto with connected socket.


          EINTR          The sendto() was interrupted by delivery of a
                         signal before any data was delivered.

     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