2 * socket.h -- declarations for socket library functions
4 * Design and implementation by Carl Harris <ceharris@mal.com>
6 * For license terms, see the file COPYING in this directory.
13 Create a new client socket
14 returns (FILE *)NULL on error
16 FILE *Socket(char *host, int clientPort);
19 Get a string terminated by an '\n', delete any '\r' and the '\n'.
20 Pass it a valid socket, a buffer for the string, and
21 the length of the buffer (including the trailing \0)
22 returns 0 for success.
24 int SockGets(char *buf, int len, FILE *sockfp);
27 Write a chunk of bytes to the socket.
28 Returns 0 for success.
30 int SockWrite(char *buf, int len, FILE *sockfp);
33 Send formatted output to the socket, followed
35 Returns 0 for success.
37 #if defined(HAVE_STDARG_H)
38 int SockPrintf(FILE *sockfp, char *format, ...) ;