Implement win32 socket shutdown support.
authorChris Hanson <org/chris-hanson/cph>
Sat, 25 Nov 2006 05:11:48 +0000 (05:11 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sat, 25 Nov 2006 05:11:48 +0000 (05:11 +0000)
v7/src/microcode/ntapi.h
v7/src/microcode/ntsock.c

index c4c3862964f3c59f9db4780a4763e900a0252265..4af78262da60eb5eca476f4006fc7381e56cb309 100644 (file)
@@ -1,8 +1,9 @@
 /* -*-C-*-
 
-$Id: ntapi.h,v 1.17 2004/12/20 04:36:44 cph Exp $
+$Id: ntapi.h,v 1.18 2006/11/25 05:11:43 cph Exp $
 
 Copyright 1997,1999,2000,2002,2003,2004 Massachusetts Institute of Technology
+Copyright 2006 Massachusetts Institute of Technology
 
 This file is part of MIT/GNU Scheme.
 
@@ -92,6 +93,7 @@ enum syscall_names
   apicall_select,
   apicall_send,
   apicall_setsockopt,
+  apicall_shutdown,
   apicall_socket,
 
   /* C Library's unix-style procedures: */
@@ -954,6 +956,7 @@ static char * syscall_names_table [] =
   "send",
   "select",
   "set-socket-option",
+  "shutdown",
   "socket",
 
   /* C Library's unix-style procedures: */
index a49c2447a6fdc2f5bd789492d94b23a9e5e22f6e..e9d36fe1942fa55eaf85e34a54c10954bc8920fc 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: ntsock.c,v 1.19 2006/01/29 06:37:30 cph Exp $
+$Id: ntsock.c,v 1.20 2006/11/25 05:11:48 cph Exp $
 
 Copyright 1997,1998,1999,2001,2002,2003 Massachusetts Institute of Technology
 Copyright 2006 Massachusetts Institute of Technology
@@ -293,6 +293,15 @@ socket_channel_write (Tchannel channel, const void * buffer,
   return (n_written);
 }
 
+void
+OS_shutdown_socket (Tchannel channel, unsigned long how)
+{
+  VOID_SOCKET_CALL
+    (shutdown,
+     ((CHANNEL_SOCKET (channel)),
+      ((how == 1) ? SD_RECEIVE : (how == 2) ? SD_SEND : SD_BOTH)));
+}
+
 static void
 socket_channel_close (Tchannel channel, int errorp)
 {