AnemoneLabs / unmessage

Privacy enhanced instant messenger
GNU General Public License v3.0
43 stars 7 forks source link

Use a protocol for the conversation elements #11

Closed felipedau closed 7 years ago

felipedau commented 7 years ago

Conversation elements (e.g., presence, message, authentication, etc) are sent within regular packets, wrapped by encryption. These inner packets are currently handled by its id and content, and only work because they are simple. When more complex elements are implemented (e.g., files, voice, etc), the content must become another packet with its own structure.

I think we should find a simple protocol (preferably compact) that could be used for that. We could however create a class for each element and use a simple way to serialize them (maybe continue to join each attribute with line separators?).

felipedau commented 7 years ago

This has been done while working on #12 and all subclasses of Element are serializable.