[usocket-devel] Fwd: [usocket-cvs] r245 - usocket/trunk/backend
Erik Huelsmann
ehuels at gmail.com
Tue May 22 21:55:51 UTC 2007
Hi Douglas,
I recently added some functionality in usocket and even though I
think I could have copy-pasted from the CMU backend, I want to verify
with you if this is true.
The functions I added:
- get-host-name (as you can see in the commit mail below based on
copy-paste from CMU)
- wait-for-input-internal which I didn't copy-paste yet.
I would be especially gratefull if you could copy-paste and verify the
latter for me and optionally even supply a patch.
For testing of the multiplexing code, I use this 'script':
(load "asdf.lisp")
(asdf:oos 'asdf:load-op :usocket)
(defvar sockets nil)
(defparameter crlf (format nil "~C~C" #\Return #\Linefeed))
(defparameter host "mirror.w3media.nl")
(defparameter offset-path "/apache")
(dotimes (i 10)
(let ((s (usocket:socket-connect host 80)))
(format (usocket:socket-stream s)
"GET http://~A~A/httpd/httpd-2.0.~A.tar.gz HTTP/1.0~%~%"
host offset-path (+ 50 i))
(force-output (usocket:socket-stream s))
(push s sockets)))
(let ((buffer (make-array 8192 :element-type 'character)))
(loop
(let ((ready (usocket:wait-for-input sockets :timeout 15)))
(unless ready
(sleep 1)
(format t "No ready sockets!~%"))
(dolist (r ready)
(format t "Reading from ~A~%" r)
(read-sequence buffer (usocket:socket-stream r))))))
HTH and thanks for your reaction in advance!
bye,
Erik.
---------- Forwarded message ----------
From: ehuelsmann at common-lisp.net <ehuelsmann at common-lisp.net>
Date: May 18, 2007 12:03 AM
Subject: [usocket-cvs] r245 - usocket/trunk/backend
To: usocket-cvs at common-lisp.net
Author: ehuelsmann
Date: Thu May 17 18:03:55 2007
New Revision: 245
Modified:
usocket/trunk/backend/scl.lisp
Log:
Add cl-smtp 'requirement': get-host-name (SCL backend); needs verification.
Modified: usocket/trunk/backend/scl.lisp
==============================================================================
--- usocket/trunk/backend/scl.lisp (original)
+++ usocket/trunk/backend/scl.lisp Thu May 17 18:03:55 2007
@@ -129,3 +129,6 @@
(t
(error 'ns-unknown-error :host-or-ip name
:real-error errno))))))))
+
+(defun get-host-name ()
+ (unix:unix-gethostname))
_______________________________________________
usocket-cvs mailing list
usocket-cvs at common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-cvs
More information about the usocket-devel
mailing list