Skip to content
  • Lukáš Hrázký's avatar
    Introduce InboundMessages for the StreamPort class · 3fdb8311
    Lukáš Hrázký authored and Frediano Ziglio's avatar Frediano Ziglio committed
    
    
    Wraps the deserialization of the received messages in an InboundMessages
    class. The class is created with the deserialized header and the raw
    data of the message. A template function get_payload() returns the
    struct of the concrete message. The function is specialized for each
    incoming message.
    
    While this leaves the responsibility to call the get_payload() function
    with the message according to the type in the header to the caller, the
    solution preserves the efficiency of the original implementation without
    introducing too much complexity around the separation of the code.
    
    Signed-off-by: default avatarLukáš Hrázký <lhrazky@redhat.com>
    Acked-by: default avatarFrediano Ziglio <fziglio@redhat.com>
    3fdb8311