0fe45fa3e79cd927687a276f7cd1b3e67be2527d
[citadel.git] / citadel / server / clientsocket.h
1 // Header file for TCP client socket library
2 //
3 // Copyright (c) 1987-2024 by the citadel.org team
4 //
5 // This program is open source software.  Use, duplication, or disclosure
6 // is subject to the terms of the GNU General Public License version 3.
7
8 int sock_connect(char *host, char *service);
9 int sock_write(int *sock, const char *buf, int nbytes);
10 int sock_write_timeout(int *sock, const char *buf, int nbytes, int timeout);
11 int ml_sock_gets(int *sock, char *buf, int nSec);
12 int sock_getln(int *sock, char *buf, int bufsize);
13 int CtdlSockGetLine(int *sock, StrBuf *Target, int nSec);
14 int sock_puts(int *sock, char *buf);
15 int socket_read_blob(int *Socket, StrBuf * Target, int bytes, int timeout);
16
17 // Default timeout for client sessions
18 #define CLIENT_TIMEOUT          600