[usocket-devel] Timeouts for sbcl

Pavel G. Koukoushkin k.pavel.g at gmail.com
Thu Jun 24 16:19:10 UTC 2010


Hi all!

sb-bsd-sockets:socket-make-stream can get an :timeout keyword. And it is
works!
I think it must be used in sbcl backend in socket-connect function here is a
patch

*** usocket-0.4.1.orig/backend/sbcl.lisp 2010-05-06 14:26:15.000000000 +0400
--- usocket-0.4.1/backend/sbcl.lisp 2010-06-24 19:13:37.000000000 +0400
***************
*** 208,214 ****
         (sockopt-tcp-nodelay-p
   (fboundp 'sb-bsd-sockets::sockopt-tcp-nodelay)))
    (when deadline (unsupported 'deadline 'socket-connect))
-   (when timeout (unsupported 'timeout 'socket-connect))
    (when (and nodelay-specified
               ;; 20080802: ECL added this function to its sockets
               ;; package today. There's no guarantee the functions
--- 208,213 ----
***************
*** 224,229 ****
--- 223,229 ----
                  (sb-bsd-sockets:socket-make-stream socket
                                                     :input t
                                                     :output t
+                                                   :timeout timeout
                                                     :buffering :full
                                                     :element-type
element-type))
                 ;;###FIXME: The above line probably needs an
:external-format

Thanks a lot!

Pavel G. Koukoushkin
Moscow, Russia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20100624/d16fa415/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbcl-timeout-fix.patch
Type: text/x-patch
Size: 1188 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20100624/d16fa415/attachment.bin>


More information about the usocket-devel mailing list