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. TCP Server Accessible through the internet
Forum Updated to NodeBB v4.3 + New Features

TCP Server Accessible through the internet

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k 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.
  • VRoninV Offline
    VRoninV Offline
    VRonin
    wrote on last edited by
    #1

    I'm building a client-server application and it works fine if I use local IPs (like 192.168.1.1) but doesn't work if i use the server public IP. I guess that is because the router connected to the PC running as server doesn't allow port forwarding and keeps all the ports closed (and I'd like not to have to change that).
    Since many other applications manage to communicate with that PC even with those ports closed (online games just to mention one) how can I make my server receive connection despite the router configuration?
    I use TcpSocket and TcpServer inheriting classes and the port that I chose is 7676

    "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
    ~Napoleon Bonaparte

    On a crusade to banish setIndexWidget() from the holy land of Qt

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DerManu
      wrote on last edited by
      #2

      Games connect to game servers owned by the companies. I'm sure they have ports forwarded there ;). If you want clients to connect to the server, the server must accept incoming connections, as you said, e.g. by port forwarding when there's a router in between. This is also true for games. I'm aware that a handful of applications (skype?) manage to circumvent this protective feature of routers, but they pose a security risk to the whole network they are used in and shouldn't be supported.

      What's the problem with port forwarding your router? It's the obvious and correct way to do it.

      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