Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (de server (P H)
- (setq
- *Port P
- *Port1 (or (sys "NAME") P)
- *Home (cons H (chop H))
- P (port *Port) )
- (gc)
- (loop
- (setq *Sock (listen P))
- (NIL (fork) (close P))
- (close *Sock) )
- (http *Sock) ## Handling initial transaction
- (or *SesId (bye)) ## When http does not run across (app) end connection
- (task *Sock (http *Sock)) ## Setting up Socket listener (If i can reorder them like this why do i need this line?)
- (task *Sock
- (when (accept *Sock)
- (task @ (http @)) ) ) )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement