commit 94b41f7d9d2f1652384319b367b0c27f278956dd
parent 1fbc2cb708c91e3260f9a1f9c7d0b0ae004ddb58
Author: Tomas Hlavaty <tom@logand.com>
Date: Sun, 6 Oct 2013 21:00:14 +0200
rw.socket:accept added
Diffstat:
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/http.lisp b/http.lisp
@@ -334,7 +334,7 @@
(defun server-loop (socket quit handler host port)
(do ((q (or quit (rw:reader '(nil t)))))
((funcall q))
- (let ((c (ccl:accept-connection socket)))
+ (let ((c (rw.socket:accept socket)))
(rw.concurrency:make-thread
(format nil "RW.HTTP:SERVER-HANDLER ~s ~s" host port)
(lambda ()
diff --git a/socket.lisp b/socket.lisp
@@ -1,6 +1,7 @@
(defpackage :rw.socket
(:use :cl)
- (:export :make-passive-tcp-socket
+ (:export :accept
+ :make-passive-tcp-socket
:make-active-tcp-socket))
(in-package :rw.socket)
@@ -36,3 +37,9 @@
;; external-format (auto-close t)
;; connect-timeout input-timeout output-timeout deadline
;; fd
+
+(defun accept (socket)
+ #-ccl
+ (error "TODO port RW.SOCKET:ACCEPT")
+ #+ccl
+ (ccl:accept-connection socket))