It's enough just "_message_size" to define how musch bytes application reads from binary input. 
stream.read( reinterpret_cast<char*> (&stock_name), _message_size );