User`s guide

KwikNet TCP/IP Sockets
K
A
DAK
217
Returns If successful, the number of bytes of data sent from *buf is returned.
On failure, the error status
-1 is returned.
The error indicator for socket
s is set to define the reason for failure. Use
kn_errno() to retrieve the error code.
EBADF The socket descriptor s is invalid.
EINVAL Parameter buf or to is invalid or
the buffer length len is declared to be less than 0 or
is invalid for the socket's protocol or
parameter tolen specifies a length that is less than
the length of a valid address.
EMSGSIZE The message is larger than the maximum which can
be sent atomically as required by the socket protocol.
EPROTOTYPE Request is invalid for sockets using the TCP protocol.
EHOSTUNREACH A destination is required but is not available.
EWOULDBLOCK The socket is marked non-blocking or flags specifies
MSG_DONTWAIT but there is a need to block the caller
to complete the operation.
ENOBUFS Memory is not available to complete the request.
Restriction If none of the message data can be delivered to the socket, the caller will
be blocked unless the socket s is marked as non-blocking. In the latter
case, the caller will resume with a -1 error status and the error code
EWOULDBLOCK will be stored in the socket descriptor.
Restriction This procedure cannot be used to send to a foreign host using the TCP
protocol. Use kn_send() or kn_writev() instead.
See Also
kn_connect(), kn_send(), kn_writev(), kn_socket()