// Header file for TCP client socket library
//
-// Copyright (c) 1987-2012 by the citadel.org team
+// Copyright (c) 1987-2024 by the citadel.org team
//
-// This program is open source software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 3.
-//
-// 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.
+// This program is open source software. Use, duplication, or disclosure
+// is subject to the terms of the GNU General Public License version 3.
int sock_connect(char *host, char *service);
int sock_write(int *sock, const char *buf, int nbytes);
int sock_puts(int *sock, char *buf);
int socket_read_blob(int *Socket, StrBuf * Target, int bytes, int timeout);
-
-/*
- * This looks dumb, but it's being done for future portability
- */
-#define sock_close(sock) close(sock)
-#define sock_shutdown(sock, how) shutdown(sock, how)
-
-/*
- * Default timeout for client sessions
- */
+// Default timeout for client sessions
#define CLIENT_TIMEOUT 600
FreeStrBuf(&msgtext);
// Close one end of the socket connection; this tells SpamAssassin that we're done.
- if (sock != -1)
- sock_shutdown(sock, SHUT_WR);
+ if (sock != -1) {
+ shutdown(sock, SHUT_WR);
+ }
// Response
syslog(LOG_DEBUG, "Awaiting response\n");