They're not part of the message, it's whatever was in the buffer prior to the call to recv.
recv returns how many bytes were read into the buffer when it is successful.
To clarify, both of the above are correct. "my msg" is actually 7 chars, including a null terminator for the C-string it defines. You only send 6, so when you print it via cout, it doesn't hit a null character so it continues off until it does. Either print exactly the number of chars you recv'd using Athar's suggestion, or send the null terminator.