File: async.l

package info (click to toggle)
euslisp 9.27%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 55,344 kB
  • sloc: ansic: 41,162; lisp: 3,339; makefile: 256; sh: 208; asm: 138; python: 53
file content (12 lines) | stat: -rw-r--r-- 311 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
(defparameter sa (make-socket-address :domain af_inet :port 4095))

(cond ((y-or-n-p "server?")
       (setq sp (make-socket-port sa))
       (setq s (make-server-socket-stream sp)))
      (t
       (setq s (make-client-socket-stream sa)))
      )

(defun remote-rep (s)
   (print (read s) *standard-output*))