You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could handle when I knew the request in advance like
let request = match bmos::BmosPointsDataFrameRequest::decode(&*msg) {
Ok(request) => request,
Err(e) => {
// Error decoding the request
log::error!("Failed to decode Protocol Buffers message: {}", e);
continue;
}
};
but how can handle any type of message in the loop dynamically ?
Maybe put a required string as the first entry of each message and match that in the byte stream ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the following proto interface
I am having a nightmare handling it though.
I have a event handler like
I could handle when I knew the request in advance like
but how can handle any type of message in the loop dynamically ?
Maybe put a required string as the first entry of each message and match that in the byte stream ?
Beta Was this translation helpful? Give feedback.
All reactions