Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. (de server (P H)
  2. (setq
  3. *Port P
  4. *Port1 (or (sys "NAME") P)
  5. *Home (cons H (chop H))
  6. P (port *Port) )
  7. (gc)
  8. (loop
  9. (setq *Sock (listen P))
  10. (NIL (fork) (close P))
  11. (close *Sock) )
  12. (http *Sock) ## Handling initial transaction
  13. (or *SesId (bye)) ## When http does not run across (app) end connection
  14. (task *Sock (http *Sock)) ## Setting up Socket listener (If i can reorder them like this why do i need this line?)
  15. (task *Sock
  16. (when (accept *Sock)
  17. (task @ (http @)) ) ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement