[Unetwork-cvs] CVS update: unetwork/src/base-cmu.lisp
Matthieu Villeneuve
mvilleneuve at common-lisp.net
Sun Sep 19 18:58:56 UTC 2004
Update of /project/unetwork/cvsroot/unetwork/src
In directory common-lisp.net:/tmp/cvs-serv16125
Modified Files:
base-cmu.lisp
Log Message:
Allow specifying stream element-type in server-socket-accept
Date: Sun Sep 19 20:58:56 2004
Author: mvilleneuve
Index: unetwork/src/base-cmu.lisp
diff -u unetwork/src/base-cmu.lisp:1.2 unetwork/src/base-cmu.lisp:1.3
--- unetwork/src/base-cmu.lisp:1.2 Tue Mar 23 14:02:21 2004
+++ unetwork/src/base-cmu.lisp Sun Sep 19 20:58:55 2004
@@ -41,14 +41,14 @@
"Open a server socket on localhost on specified port."
(ext:create-inet-listener port))
-(defun server-socket-accept (server-socket &key timeout)
+(defun server-socket-accept (server-socket &key (type 'character) timeout)
"Accept a connection on a server socket. Return the
resulting socket."
(when (sys:wait-until-fd-usable server-socket :input timeout)
(let* ((sock (ext:accept-tcp-connection server-socket))
(stream (sys:make-fd-stream sock
:input t :output t
- :element-type '(unsigned-byte 8))))
+ :element-type type)))
(make-instance 'socket :sock sock :stream stream))))
(defun close-server-socket (server-socket)
More information about the Unetwork-cvs
mailing list