PDA

View Full Version : [SOLVED]setting QTcpSocket TCP_NODELAY option



freely
19th November 2011, 13:53
Hello.

In order to assure understanding and correctness:

I need to set TCP_NODELAY option to QTcpSocket, I found in documentation next function of QAbstractSocket class can be used for that:?


void setSocketOption ( QAbstractSocket::SocketOption option, const QVariant & value )

enum QAbstractSocket::SocketOption

QAbstractSocket::LowDelayOption = 0

should be used.

I can’t find in the documentation description of value – second function parameter meaning ?
I do not understand what to put to second parameter value ?
How can I set that option , whether by next call:
….setSocketOption(0);?

Thanks in advance.

Oleg
19th November 2011, 16:32
Try this:


m_socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);

freely
19th November 2011, 16:50
yes ,right.
thank you.
solved.