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?).
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
andcontent
, 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?).