Socket: Send Struct or Send int

i’d like to send data in a struct or at least some int values from Unreal tcp to my c++ software.
Now I see all sockets here taking a FString as an input message. How to get my struct or int sent?
How to get the struct to the TCHAR* or uint8*?

Thanks a lot!

Can’t speak for other but we:

  • pack message parameters to successive bytes
  • send via TCP
  • receive bytes
  • unpack parameters and dispatch message

Serialization is the way to go for this as Jocko Jonson mentioned above.

Look into using:…Bin/index.html

If you are sending the data from UE4 to an external application you will have to look into how the serialization works and make a similar function in your external application in order to deserialize the data though.

Alternatively you could serialize the data by yourself using some kind of csv format or json.