Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I wonder what the basic options for QTCPSocket are.
Forum Updated to NodeBB v4.3 + New Features

I wonder what the basic options for QTCPSocket are.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 346 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    keyboard_hellchang
    wrote on last edited by
    #1

    Hi.
    my qt version 4.8.7
    my OS is centos7

    I wonder what the default options for QTCPSocket are.
    LowDelayOption??
    KeepAlive??

    Do I need to set up in a .pro file or Makefile, not a code?

    Please Help me!!!

    KroMignonK jsulmJ 2 Replies Last reply
    0
    • K keyboard_hellchang

      Hi.
      my qt version 4.8.7
      my OS is centos7

      I wonder what the default options for QTCPSocket are.
      LowDelayOption??
      KeepAlive??

      Do I need to set up in a .pro file or Makefile, not a code?

      Please Help me!!!

      KroMignonK Offline
      KroMignonK Offline
      KroMignon
      wrote on last edited by
      #2

      @keyboard_hellchang said in I wonder what the basic options for QTCPSocket are.:

      I wonder what the default options for QTCPSocket are.
      LowDelayOption??
      KeepAlive??

      Have you tried to search in documentation?

      • QAbstractSocket::LowDelayOption

      Try to optimize the socket for low latency. For a QTcpSocket this would set the TCP_NODELAY option and disable Nagle's algorithm. Set this to 1 to enable.

      • QAbstractSocket::KeepAliveOption

      Set this to 1 to enable the SO_KEEPALIVE socket option

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      1
      • K keyboard_hellchang

        Hi.
        my qt version 4.8.7
        my OS is centos7

        I wonder what the default options for QTCPSocket are.
        LowDelayOption??
        KeepAlive??

        Do I need to set up in a .pro file or Makefile, not a code?

        Please Help me!!!

        jsulmJ Online
        jsulmJ Online
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @keyboard_hellchang Qt is open source, so you can simply check the QTCPSocket implementation (default constructor) to see how socket is initialized.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved