1. what is a barr ?
2. try
qint64 QIODevice::writeData ( const char * data, qint64 maxSize )
instead of write function
3. try to write byte by byte like this
Qt Code:
  1. for ( int i = 0; i < 10; i++ )
  2. {
  3. tcpSocket->write( &arr[ i ], 1 );
  4. }
To copy to clipboard, switch view to plain text mode 
4. How do you see, that not all of written bytes are received ?