Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [SOLVED] Debugging program with sockets requires root.
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Debugging program with sockets requires root.

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 931 Views 1 Watching
  • 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
    kordax
    wrote on last edited by
    #1

    Hi all!

    I'm writing simple web server using linux system sockets (this must be fast, i'm fighting for ms, so i don't use QTcpServer).
    The problem:
    To bind and accept connection on socket i must run program as root.
    Of course, running complex IDE such as QtCreator as root brings lot of problems.

    So i just wonder, is there any solution to run and debug such project in QtCreator?
    I'm using 80 and 443 ports, so they are reserved.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      For development purpose you should rather use a free port i.e. port number over 1024 like 8000 which is a classic for development servers

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kordax
        wrote on last edited by
        #3

        Okay, seems like it is the only solution, but it's simpliest.
        Thank you, at least now im sure :)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          A port number is just that, whether it's 80 or 8000 doesn't matter from an implementation point of view.

          Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

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