Mailing list header changes (fuck you Google)
[citadel.git] / citadel / clientsocket.h
1 /*
2  * Header file for TCP client socket library
3  *
4  * Copyright (c) 1987-2012 by the citadel.org team
5  *
6  *  This program is open source software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License version 3.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  */
14
15 int sock_connect(char *host, char *service);
16 int sock_write(int *sock, const char *buf, int nbytes);
17 int sock_write_timeout(int *sock, const char *buf, int nbytes, int timeout);
18 int ml_sock_gets(int *sock, char *buf, int nSec);
19 int sock_getln(int *sock, char *buf, int bufsize);
20 int CtdlSockGetLine(int *sock, StrBuf *Target, int nSec);
21 int sock_puts(int *sock, char *buf);
22 int socket_read_blob(int *Socket, StrBuf * Target, int bytes, int timeout);
23
24
25 /* 
26  * This looks dumb, but it's being done for future portability
27  */
28 #define sock_close(sock)                close(sock)
29 #define sock_shutdown(sock, how)        shutdown(sock, how)
30
31 /* 
32  * Default timeout for client sessions
33  */
34 #define CLIENT_TIMEOUT          600