Two things:
#1 You allocate the socket on the heap, and then return from your method before it has finished sending. You need to wait for it before exiting your method.
#2 Why don't you use the qint64 write ( const char * data, qint64 maxSize ) method directly, and skip the buffering.
Bookmarks