How the heck can I receive a structure data trough socket? I need this because the serversend data as structure!

struct contain only int data, if that can help!
Posted on 2002-04-25 17:00:28 by robroy
maybe you could receive data in a buffer first,
and then copy the bytes into the structure ?
Posted on 2002-04-25 18:55:20 by Jurgen
the client send structured data, so I can't
Your ideea is good too - but i don't know how to parse that data,
because all struct. members are integers number!

any clue?
Posted on 2002-04-26 20:23:02 by robroy
When you call recv just pass the address of an empty structure, you may want to check the numver of bytes actually received to make sure you filled the struct
Posted on 2002-04-27 08:54:34 by Kudos