sock_write(3z)

NAME
sock_write - write bytes to a network socket

SYNOPSIS
#include <net/socket.h>

size_t sock_write(SOCKET *s, void *dp , size_t len);

DESCRIPTION
The parameter s is a descriptor to an open socket created using sock_open(3z) or sock_listen(3z)

The sock_write() function writes a stream of bytes to the open socket specified by s. The data of length len is taken from address dp which should be in the lower 16k of the memory map.

RETURN VALUE
The sock_write() function returns the number of bytes written to the socket. If an illegal socket is supplied the carry flag will be set and the return value will be EPROTONOSUPPORT.

SEE ALSO
sock_putc(3z), sock_puts(3z)

AUTHOR
Dominic Morris <dom@jb.man.ac.uk>