.\"send a message from a socket .TH socket_write 3 .SH NAME socket_write() - send a message from a socket .SH SYNOPSIS .nf #include #include int socket_write(int s, mixed message, string|void address) .SH DESCRIPTION socket_write() sends a message on a socket s. If the socket s is of type STREAM or MUD, the socket must already be connected and the address is not specified. If the socket is of type DATAGRAM, the address must be specified. The address is of the form: "127.0.0.1 23". .SH RETURN VALUES socket_write() returns: .IP EESUCCESS on success. .IP a negative value indicated below on error. .SH ERRORS .TP 15 EEFDRANGE Descriptor out of range. .TP EEBADF Descriptor is invalid. .TP EESECURITY Security violation attempted. .TP EENOADDR Socket not bound to an address. .TP EEBADADDR Problem with address format. .TP EENOTCONN Socket not connected. .TP EEALREADY Operation already in progress. .TP EETYPENOTSUPP Object type not supported. .TP EEBADDATA Sending data with too many nested levels. .TP EESENDTO Problem with sendto. .TP EEMODENOTSUPP Socket mode not supported. .TP EEWOULDBLOCK Operation would block. .TP EESEND Problem with send. .TP EECALLBACK Wait for callback. .SH SEE ALSO socket_connect(3), socket_create(3)