There are a couple of things wrong with your implementation.
What you need to understand is that data on the wire (communication link) is just an array of bytes and it is up to the platforms on both sides of the link to parse them into something more meaningful. This means that serialization of data to the communication media and deserialization of it back to human readable format have to match each other as well as the platform used on each side. For instance sending from a little endian platform to a big endian platform (intel to motorolla) without taking care of byte switching will result in completely messing up the data on the other side.
Coming back to your example, you naively passed the pointer to your struct as if it was an array of characters. This assumes that the memory allocated to your variables is contiguous which is not necessarily the case. In addition, there is the issue of byte alignment for each side's environment which means that unless it is set to 1 on both sides, the compiler on the sending side may pad some of the variables with zero values, causing the other side to read them differently if it is set to a different byte alignment.
So to summarize:
In order for this to work safely, you need to copy your variables explicitly to the sending buffer, and read them explicitly on the other side. You also should make sure that you are using the same platform on both sides (I'm assuming you have intel for both).
By the way, when dealing with strings, you need to ensure that the trailing 0 is copied so when you try to read the string on the other side, it will read correctly.