Skip to content
  • 0 Votes
    4 Posts
    156 Views
    Christian EhrlicherC

    @Joe-von-Habsburg said in Take message only 1 port by UDP socket receive:

    How can I ignore ?

    Look at the QHostAddress and don't process it - there is no other chance except you add some filtering on OS level but Qt can't do anything against it.

  • 0 Votes
    5 Posts
    277 Views
    J

    @JonB thank you so much

  • 2 Votes
    8 Posts
    596 Views
    ekkescornerE

    @SGaist did some more tests. removed some lines with errors from .pro and got some more output from qmake2cmake. but only for the easy parts ;-)

    android or ios - specific parts are missed.
    ATM I'm learning from CMakeLists.txt provided by Qt example apps, other projects and documentation.

    what's really missed: official guides for mobile (android and ios) apps (including translations, native code, custom info.plist, Android Manifest, openSSL) from build to deploy and publish to stores using CMake.

    of course I'll blog about my findings in some weeks.

  • 0 Votes
    2 Posts
    407 Views
    JonBJ

    @TokaraForest
    I don't see that it will make any difference whether you stick with asynchronous approach (which does not block) in UI thread or use synchronous approach with waitFor...() in a thread (which will block that thread but not the Ui thread). Either way scanning 100 ports will take some time because each port has to have time to timeout. It will be "slow". You might as well use asynchronous and not get involved with threads if this is what you have to do.

    But why do you want to scan ports, and at which side? Client should be able to be set to use any available port to connect to server (this is fast). And server needs to specify which port it will be listening on, there is no point it finding a free one as client will not know which one it picked to connect on.

  • 0 Votes
    11 Posts
    3k Views
    K

    @aowoo said in How to access IO port in QT?:

    directly read and write to the I/O port

    AFAIK, It's impossible for Windows && Linux:

    On Windows you need in a special driver (It is not enough to use just some DLL's, because you need in a driver. Most likelly, that inpout32.dll has a pre-compiled driver in own resources and loads this driver in runtime).

    On Linux you need in a special permissions too.

  • 0 Votes
    1 Posts
    558 Views
    No one has replied
  • 0 Votes
    4 Posts
    2k Views
    SGaistS

    Good, then please mark the thread as solved using the "Topic Tool" button so other forum users may know a solution has been found :)

  • Static port for QTcpSocket

    Unsolved General and Desktop
    3
    0 Votes
    3 Posts
    2k Views
    B

    A TCP/IP connection utilizes two ports, the one you connect to on the remote end and a local port that is used for incoming data. The local port is an ephemeral port assigned by the operating system from the pool of free ephemeral port numbers. This is normal operation, you do not need to have a fixed local port because the the ephemeral port is sent to the remote end so that it knows how to reply to you the client.

    QAbstractSocket::peerPort() returns the remote port number.

  • 0 Votes
    5 Posts
    3k Views
    Arty.McLabinA

    @mcosta

    i am able to view the page inside the browser tho, why can't Qt read it then?