Handle correct message length in MPI
and also convert the binary message length to small endian according to the convention of the TCP server.
and also convert the binary message length to small endian according to the convention of the TCP server.