Varie correzioni, completata revisione capitolo sull'I/O su file
[gapil.git] / sources / is_closing.c
index 32e66aa78018407e52ef80ddcb1f3e754a3b6e53..ac3477a9d01b88d15a380578dffa9c4a3ea70ed0 100644 (file)
  * Author: Simone Piccardi
  * Sep. 2006
  *
- * $Id$ 
- *
  ****************************************************************/
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <errno.h>       /* error code */
+#include <sys/socket.h>  /* socket constants, types and functions */
+#include <netinet/in.h>  /* IPv4 and IPv6 constants and types */
+#include <netinet/tcp.h> /* TCP constants and types */
+#include <errno.h>       /* error definitions and routines */
 #
 int is_closing(int sock) 
 {
-    int err;
     struct tcp_info info;
     socklen_t len = sizeof(info);
     if (getsockopt(sock, SOL_TCP, TCP_INFO, &info, &len) != -1) {