Need help understanding serializer

Robin Sommer sommer at
Tue Apr 27 10:16:48 PDT 2004

On Mon, Apr 26, 2004 at 12:27 -0700, Christian Kreibich wrote:

>   bool Serialize(Serializer* s) const;
>   bool Serialize(Serializer* s, SerialInfo* i, bool cache = true) const;

Good point. The difference is that you don't call
SerialObj::Serialize() directly but Conn::Serialize() which, in
turn, uses SerialObj::Serialize() to do its work; i.e.
SerialObj::Serialize() does not really belong to the user-interface.

I guess SerialObj::Serialize() should better be protected
(and perhaps even renamed). I'll change this. Thanks!

> arbitrary serializable objects but just for the specific types that
> their names indicate, right?


> ...). How do I get from the Serializer at the receiving end noticing
> that something arrives, to the Bar::Unserialize() call at the far end?

If I understand your question correctly, you're expecting some
call-back mechanism, right? That's not the case here. The receiving
Serializer sees that one of the basic entities (i.e. those with
character constants) has arrived. Then it will call the
corresponding Unserialize() method. If that is, e.g., a Connection,
then Connection::Unserialize() is called. If the connection contains
a Foo object, Connection::DoUnserialize() will call

> I even have a name for the client library already: libbroccoli. BRO
> Client COmmunications LIbrary ;)

Cool! :-)

On Mon, Apr 26, 2004 at 22:48 -0700, Christian Kreibich wrote:

> Bro-Bro specific stuff? And let the toplevel Serializer be a very
> bare-bones interface that only lets you read/write primitives (ie the
> various Read/Write methods)?

In general, adding an extra step would be fine with me. But I am not
sure if I got your idea right. Do you indeed want to access only the
Read/Write methods (not any of the Serialize/Unserialize)? If yes,
perhaps the SerializationFormat itself would suffice?


Robin Sommer * Room        01.08.055 *
TU Munich    * Phone (089) 289-18006 *  sommer at 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20040427/dcd0dba8/attachment.bin 

More information about the Bro mailing list