Ignore:
Timestamp:
01/15/07 04:00:39 (18 years ago)
Author:
psmith
Message:

yarpc - Send packet OK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/home/psmith/restructure/src/protocol/yarpc/yarpc-packet-factory.lisp

    r33 r35  
    3636  (make-instance 'yarpc-packet-factory))     
    3737
    38 (defconstant CALL-METHOD-PACKET-ID 0)
     38(defconstant CALL-METHOD-PACKET-ID #x0)
    3939(defconstant METHOD-RESPONSE-PACKET-ID 1)
    4040
    4141(defmethod get-packet ((pf yarpc-packet-factory) buf)
    42   (nio-buffer:flip buf)
     42  (flip buf)
    4343;  (format t "get-packet::read string - ~A~%" (bytebuffer-read-string buf (remaining buf)))
    4444  (if (>= (remaining buf) 1) ;; First byte denotes packet ID
     
    5050                                            :accessor get-call-string)))
    5151
     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
    5263(defclass method-response-packet (packet)())
    5364
Note: See TracChangeset for help on using the changeset viewer.