github.com/o3ma/o3 (go): Package o3 central communication unit responsible for complete exchanges (like handshake and subsequent message reception). Uses functions in packethandler and packetdispatcher to deal with incoming and outgoing messages. Errors in underlying functions bubble up as panics and have to be re- covered here, converted to go errors and returned.  Package o3 functions to prepare and send packets. All preparation required to transmit a packet takes place in the packet's respective dispatcher function. Functions from packetserializer are used to convert from struct to byte buffer form that can then be transmitted on the wire. Errors from packetserializer bubble up here in the form of panics that have to be passed on to communicationhandler for conversion to go errors.  Package o3 handler functions for individual incoming packets. All functions here are called from communicationhandler. Functions in here use packetparser to parse packets into their respective structs. Any action required upon receiving a specific packet is then per- formed within its handler like updating nonces and storing keys in the session context. Errors in underlying functions bubble up to here in the form of panics and are passed on to communicationhandler for central conversion to go errors.  Package o3 functions to convert packets from byte buffers to go structs. These functions are called from packethandler only and their task is only conversion. Errors are bubbled up the chain as panics and will be converted to go errors further up the chain.
Keywords: academic-project|protocol|threema