edicl / hunchentoot

Web server written in Common Lisp
https://edicl.github.io/hunchentoot/
697 stars 123 forks source link

Implement set-timeouts for clasp #230

Open rabbibotton opened 4 months ago

rabbibotton commented 4 months ago

https://github.com/edicl/hunchentoot/blob/master/set-timeouts.lisp

hanshuebner commented 4 months ago

Are you planning to come up with a PR?

rabbibotton commented 4 months ago

I am the wrong person to do it, but if no one, eventually I will try. clasp only compiled with my software the first time this last version so I know little about it.

hanshuebner commented 4 months ago

Let's see if someone speaks up.

rabbibotton commented 4 months ago

For myself or another:

The C code for the sockets is here https://github.com/clasp-developers/clasp/tree/main/src/sockets The Lisp side is here https://github.com/clasp-developers/clasp/tree/main/src/lisp/modules/sockets

rabbibotton commented 4 months ago

in theory these are the changes, but needs someone to test (my project not working even with this, no data sent to browser, and no time to debug at moment)

-  #+:ecl
+  #+(or :ecl :clasp)
   (when read-timeout
     (setf (sb-bsd-sockets:sockopt-receive-timeout (usocket:socket usocket))
          read-timeout))
-  #+:ecl
+  #+(or :ecl :clasp)
   (when write-timeout
     (setf (sb-bsd-sockets:sockopt-send-timeout (usocket:socket usocket))
          write-timeout))
@@ -80,8 +80,6 @@ set."
   #+:abcl
   (when write-timeout
     (warn "Unimplemented."))
-  #+:clasp
-  (warn "set-timeouts unimplemented.")