05d6d6a27b
Ignore-this: 56da01e981b760cfc49a3007a67d629 darcs-hash:20100925134808-16a00-b2f8d2cd283140d964d264bec00e3ed67421bcae
26 lines
961 B
Common Lisp
26 lines
961 B
Common Lisp
(cl:in-package #:osc)
|
|
|
|
(defgeneric make-listening-thread (listening-device))
|
|
|
|
(defmethod connect progn ((listening-device listening-device)
|
|
host-port &key host-address host-name port)
|
|
(declare (ignore host-port host-address host-name port))
|
|
(set-listening-thread (make-listening-thread listening-device)
|
|
listening-device))
|
|
|
|
(defmethod quit ((device listening-device))
|
|
(sb-thread:terminate-thread (listening-thread device)))
|
|
|
|
(defmethod osc-device-cleanup ((device listening-device))
|
|
(set-listening-thread nil device)
|
|
(call-next-method))
|
|
|
|
(defmethod osc-device-cleanup ((device receiving-device))
|
|
(fill (socket-buffer device) 0)
|
|
(call-next-method))
|
|
|
|
(defun print-osc-debug-msg (receiver message length address port
|
|
timetag)
|
|
(format t "~%~A~%received:~A~A ~A bytes from ~A ~A ~%timetag:~A~A~%unix-time:~A~F~%"
|
|
(name receiver) #\Tab message length address port #\Tab
|
|
timetag #\Tab (when timetag (timetag->unix-time timetag))))
|