[Gd-chatter] r11664 - trunk/libraries/packetizer

hannes at gwydiondylan.org hannes at gwydiondylan.org
Tue Feb 5 03:10:31 CET 2008


Author: hannes
Date: Tue Feb  5 03:10:31 2008
New Revision: 11664

Modified:
   trunk/libraries/packetizer/leaf-frames.dylan
Log:
Job: 7299
support for number collections as raw-frames


Modified: trunk/libraries/packetizer/leaf-frames.dylan
==============================================================================
--- trunk/libraries/packetizer/leaf-frames.dylan	(original)
+++ trunk/libraries/packetizer/leaf-frames.dylan	Tue Feb  5 03:10:31 2008
@@ -498,6 +498,15 @@
   end
 end;
 
+
+define method as (class == <raw-frame>, bytes :: <collection>)
+ => (res :: <raw-frame>)
+  let sv = make(<raw-frame>,
+                data: make(<byte-sequence>, capacity: bytes.size));
+  copy-bytes(sv.data, 0, bytes, 0, bytes.size);
+  sv;
+end;
+
 define method read-frame (type == <raw-frame>,
                           string :: <string>)
  => (res)



More information about the chatter mailing list