+ Reply to Thread
Results 1 to 3 of 3

Thread: [SOLVED]setting QTcpSocket TCP_NODELAY option

  1. #1
    Join Date
    Jul 2010
    Posts
    72
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default [SOLVED]setting QTcpSocket TCP_NODELAY option

    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:?

    Qt Code:
    1. void setSocketOption ( QAbstractSocket::SocketOption option, const QVariant & value )
    To copy to clipboard, switch view to plain text mode 
    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.
    Last edited by freely; 19th November 2011 at 17:50. Reason: solved

  2. #2
    Join Date
    Oct 2007
    Location
    Lake Forest, CA, USA
    Posts
    132
    Thanks
    10
    Thanked 27 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: setting QTcpSocket TCP_NODELAY option

    Try this:
    Qt Code:
    1. m_socket->setSocketOption(QAbstractSocket::LowDelayOption, 1);
    To copy to clipboard, switch view to plain text mode 
    Oleg Shparber

  3. #3
    Join Date
    Jul 2010
    Posts
    72
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: setting QTcpSocket TCP_NODELAY option

    yes ,right.
    thank you.
    solved.

+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 11th March 2010, 22:30
  2. Remove Help option
    By bismitapadhy in forum Qt Programming
    Replies: 4
    Last Post: 15th June 2009, 14:23
  3. QTcpSocket and keep-alive option.
    By fanat9 in forum Qt Programming
    Replies: 2
    Last Post: 20th February 2008, 17:54
  4. using the lib template dll option on *nix
    By jamadagni in forum Qt Programming
    Replies: 3
    Last Post: 19th April 2007, 14:14
  5. rtti option
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 5th January 2007, 16:10

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts