Repaginate.
authorChris Hanson <org/chris-hanson/cph>
Sun, 11 Jun 2006 03:04:17 +0000 (03:04 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 11 Jun 2006 03:04:17 +0000 (03:04 +0000)
v7/src/runtime/socket.scm

index 8b6a6885eb17c9d095aa9c4ef40325898fa08ba4..241f591000f6eef27357b51db2f83a603daf0966 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: socket.scm,v 1.27 2006/06/11 03:03:22 cph Exp $
+$Id: socket.scm,v 1.28 2006/06/11 03:04:17 cph Exp $
 
 Copyright 1996,1997,1998,1999,2001,2002 Massachusetts Institute of Technology
 Copyright 2003,2004,2005,2006 Massachusetts Institute of Technology
@@ -29,35 +29,6 @@ USA.
 
 (declare (usual-integrations))
 \f
-(define (open-tcp-stream-socket host-name service)
-  (let ((channel (open-tcp-stream-socket-channel host-name service)))
-    (make-generic-i/o-port channel channel)))
-
-(define (open-unix-stream-socket filename)
-  (let ((channel (open-unix-stream-socket-channel filename)))
-    (make-generic-i/o-port channel channel)))
-
-(define (open-tcp-stream-socket-channel host-name service)
-  (let ((host
-        (vector-ref (or (get-host-by-name host-name)
-                        (error:bad-range-argument
-                         host-name
-                         'open-tcp-stream-socket-channel))
-                    0))
-       (port (tcp-service->port service)))
-    (open-channel
-     (lambda (p)
-       (with-thread-timer-stopped
-        (lambda ()
-          ((ucode-primitive new-open-tcp-stream-socket 3) host port p)))))))
-
-(define (open-unix-stream-socket-channel filename)
-  (open-channel
-   (lambda (p)
-     (with-thread-timer-stopped
-       (lambda ()
-        ((ucode-primitive new-open-unix-stream-socket 2) filename p))))))
-\f
 (define (open-tcp-server-socket service #!optional host)
   (let ((server-socket (create-tcp-server-socket)))
     (bind-tcp-server-socket server-socket
@@ -125,6 +96,35 @@ USA.
     (and channel
         (make-generic-i/o-port channel channel))))
 \f
+(define (open-tcp-stream-socket host-name service)
+  (let ((channel (open-tcp-stream-socket-channel host-name service)))
+    (make-generic-i/o-port channel channel)))
+
+(define (open-unix-stream-socket filename)
+  (let ((channel (open-unix-stream-socket-channel filename)))
+    (make-generic-i/o-port channel channel)))
+
+(define (open-tcp-stream-socket-channel host-name service)
+  (let ((host
+        (vector-ref (or (get-host-by-name host-name)
+                        (error:bad-range-argument
+                         host-name
+                         'open-tcp-stream-socket-channel))
+                    0))
+       (port (tcp-service->port service)))
+    (open-channel
+     (lambda (p)
+       (with-thread-timer-stopped
+        (lambda ()
+          ((ucode-primitive new-open-tcp-stream-socket 3) host port p)))))))
+
+(define (open-unix-stream-socket-channel filename)
+  (open-channel
+   (lambda (p)
+     (with-thread-timer-stopped
+       (lambda ()
+        ((ucode-primitive new-open-unix-stream-socket 2) filename p))))))
+
 (define (get-host-by-name host-name)
   (with-thread-timer-stopped
     (lambda ()