citadel
About: Citadel is an advanced messaging and collaboration system for groupware and BBS applications (preferred OS: Linux).
  Fossies Dox: citadel.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

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