X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fclientsocket.h;h=2c9a5d3689a46af5cf4fd1f4d2070140b2c63f18;hb=4eb74b26380dfde31c86c685f0589e0c653aebf0;hp=21d414c3b52d1160981a060f8fc80f1bf695c1d4;hpb=e1ed5775fd16a5e47257964e7d8ae333576a3e8c;p=citadel.git diff --git a/citadel/clientsocket.h b/citadel/clientsocket.h index 21d414c3b..2c9a5d368 100644 --- a/citadel/clientsocket.h +++ b/citadel/clientsocket.h @@ -2,14 +2,30 @@ * $Id$ * * Header file for TCP client socket library + * + * Copyright (c) 1987-2009 by the citadel.org team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ int sock_connect(char *host, char *service, char *protocol); -int sock_read_to(int sock, char *buf, int bytes, int timeout); -int sock_read(int sock, char *buf, int bytes); +int sock_read_to(int sock, char *buf, int bytes, int timeout, int keep_reading_until_full); +int sock_read(int sock, char *buf, int bytes, int keep_reading_until_full); int sock_write(int sock, char *buf, int nbytes); int ml_sock_gets(int sock, char *buf); -int sock_gets(int sock, char *buf); +int sock_getln(int sock, char *buf, int bufsize); int sock_puts(int sock, char *buf); @@ -22,4 +38,4 @@ int sock_puts(int sock, char *buf); /* * Default timeout for client sessions */ -#define CLIENT_TIMEOUT 90 +#define CLIENT_TIMEOUT 600