- Timestamp:
- 01/15/07 04:00:39 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-packet-factory.lisp ¶
r33 r35 36 36 (make-instance 'yarpc-packet-factory)) 37 37 38 (defconstant CALL-METHOD-PACKET-ID 0)38 (defconstant CALL-METHOD-PACKET-ID #x0) 39 39 (defconstant METHOD-RESPONSE-PACKET-ID 1) 40 40 41 41 (defmethod get-packet ((pf yarpc-packet-factory) buf) 42 ( nio-buffer:flip buf)42 (flip buf) 43 43 ; (format t "get-packet::read string - ~A~%" (bytebuffer-read-string buf (remaining buf))) 44 44 (if (>= (remaining buf) 1) ;; First byte denotes packet ID … … 50 50 :accessor get-call-string))) 51 51 52 (defmethod print-object ((packet call-method-packet) stream) 53 (format stream "#<CALL-METHOD-PACKET ~A >" (get-call-string packet))) 54 55 (defmethod write-bytes((packet call-method-packet) buf) 56 (format t "yarpc-packet-factory:write-bytes - writing ~A to ~A~%" packet buf) 57 ; (nio-buffer:flip buf) 58 (nio-buffer:bytebuffer-write-vector buf #(#x0)) 59 (nio-buffer:bytebuffer-write-string buf (get-call-string packet)) 60 (format t "yarpc-packet-factory:write-bytes - written ~A~%" buf) ) 61 62 52 63 (defclass method-response-packet (packet)()) 53 64
Note: See TracChangeset
for help on using the changeset viewer.