Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Convert struct to string and reconstruct a struct from string
Convert struct to string and reconstruct a struct from string [message #55321] Fri, 30 October 2020 02:35 Go to previous message
sinpeople is currently offline  sinpeople
Messages: 29
Registered: October 2020
Location: Singapore
Promising Member

Hi folks,

I have a client and server which communicates via UDP. Ideally, the client converts one struct to strings and sent it to server with its client id and a command id. The message would be like "ClientID, MessageID, Strings converted from a struct". The server side picks up the message and from the messageID, it knows which struct to be used to recover its content from the remaining portion of the message, at the server side.

In case that I have roughly about 100+ such structs, how do I construct this portion to avoid a huge switch case to make the program lean with current available resources in U++?

Please point me to the right direction. I am very new to U++.

Thank you very much!


Best Regards
David
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Looking for examples to split string into container
Next Topic: What does this compiling error mean exactly?
Goto Forum:
  


Current Time: Sun Apr 28 18:59:57 CEST 2024

Total time taken to generate the page: 0.02523 seconds