.\"send a message from a socket .DT socket_write Discworld driver help socket_write Name .SI 5 socket_write() - send a message from a socket .EI Synopsis .SI 5 .EI #include <socket.h> #include <socket_errors.h> int socket_write(int s, mixed message, string|void address) Description .SP 5 5 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". .EP Return values .SI 5 socket_write() returns: .EI .TP EESUCCESS on success. .TP a negative value indicated below on error. Errors .SI 5 .EI .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. See also .SI 5 socket_connect(3), socket_create(3) .EI