Results 1 to 7 of 7

Thread: forcing local port number from TcpSocket?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: forcing local port number from TcpSocket?


  2. #2
    Join Date
    Mar 2007
    Posts
    59
    Thanks
    7

    Default Re: forcing local port number from TcpSocket?

    I saw that one, but the description didnt match what i needed, it seemed it was for something else.

    You can call this function in a subclass of QAbstractSocket to change the return value of the localPort() function after a connection has been established. This feature is commonly used by proxy connections for virtual connection settings.

    Note that this function does not bind the local port of the socket prior to a connection (e.g., QUdpSocket::bind()).
    How can this be useful if it does not bind the port until after the connection is established?
    Last edited by jacek; 3rd January 2008 at 17:24. Reason: changed [code] to [quote]

  3. #3
    Join Date
    Mar 2007
    Posts
    59
    Thanks
    7

    Default Re: forcing local port number from TcpSocket?

    also on compile:

    /usr/local/Trolltech/Qt-4.3.1/include/QtNetwork/qabstractsocket.h:158: error: `void QAbstractSocket::setLocalPort(quint16)' is protected
    process.cpp:26: error: within this context
    make: *** [process.o] Error 1

Similar Threads

  1. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13

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
  •  
Qt is a trademark of The Qt Company.