sizeof(message)
gives the size of the pointer, which is typically 32-bit or 64-bit depending on your machine. You want
sizeof(BattleshipMessage)
which gives the size of the class. Even then, I'm not sure this is the right approach since each class object will contain a pointer to the vtable which handles the dynamic dispatch/virtual function calls, and sending the class across machines using the raw casting approach that you use will invalidate that pointer.
I think you should first serialize your object (i.e. convert it to a stream of characters) before sending it across the network, then deserialize to reconstruct the class: Is it possible to serialize and deserialize a class in C++?