for connected embedded systems
sendmsg()
Send a message and its header to a socket
Synopsis:
#include <sys/types.h> #include <sys/socket.h> ssize_t sendmsg( int s, const struct msghdr * msg, int flags );
Arguments:
- s
- The descriptor for the socket; see socket().
- msg
- A pointer to the message that you want to send. For a description of the msghdr structure, see recvmsg().
-msg() function is used to transmit a message to another socket. You can use send() only when the socket is in a connected state; you can use sendmsg() at any time.
No indication of failure to deliver is implicit in a sendmsg(). Locally detected errors are indicated by a return value of -1.
If no message space is available at the socket to hold the message to be transmitted, then sendmsg().
- EWOULDBLOCK
- The socket is marked nonblocking and the requested operation would block.
Classification:
See also:
getsockopt(), ioctl(), recv(), select(), send(), sendto(), socket(), write()