[usocket-devel] r507 : open-mcl : socket-connect scales the timeout value incorrectly

good evening; in the openmcl backend, socket-connect[1] converts the timeout value to internal runtime units, but (at least for a tcp connection) the respective ccl operator[2] intends to convert from seconds to milliseconds ---- [1] http://trac.common-lisp.net/usocket/browser/usocket/trunk/backend/ openmcl.lisp?rev=499#L89 [2] http://trac.clozure.com/ccl/browser/trunk/source/level-1/l1- sockets.lisp#L774 socket-connect -> make-socket -> make-ip-socket -> make-tcp-socket -> make-tcp-stream-socket

Hi, James Thanks for pointing this. I think you're right. Let me confirm, so you're suggesting that we should just pass the TIMEOUT argument directly into OPENMCL-SOCKET:MAKE-SOCKET, like below? (defun socket-connect (host port &key (element-type 'character) timeout deadline nodelay local-host local-port) (with-mapped-conditions () (let ((mcl-sock (openmcl-socket:make-socket :remote-host (host-to-hostname host) :remote-port port :local-host (when local-host (host-to-hostname local-host)) :local-port local-port :format (to-format element-type) :deadline deadline :nodelay nodelay :connect-timeout timeout))) ; here (openmcl-socket:socket-connect mcl-sock) (make-stream-socket :stream mcl-sock :socket mcl-sock)))) Regards, Chun Tian (binghe) 在 2010-1-4,02:10, james anderson 写道:
good evening;
in the openmcl backend, socket-connect[1] converts the timeout value to internal runtime units, but (at least for a tcp connection) the respective ccl operator[2] intends to convert from seconds to milliseconds
---- [1] http://trac.common-lisp.net/usocket/browser/usocket/trunk/backend/ openmcl.lisp?rev=499#L89 [2] http://trac.clozure.com/ccl/browser/trunk/source/level-1/l1- sockets.lisp#L774 socket-connect -> make-socket -> make-ip-socket -> make-tcp-socket -> make-tcp-stream-socket
_______________________________________________ usocket-devel mailing list usocket-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel
participants (2)
-
Chun Tian (binghe)
-
james anderson