Results 1 to 4 of 4

Thread: Binding a QTcpSocket to a specific enternet interface

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jun 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: Binding a QTcpSocket to a specific enternet interface

    Hmmmm, I had considered that function but the help says

    Quote Originally Posted by QT Creator Help
    void QAbstractSocket::setLocalAddress ( const QHostAddress & address ) [protected]

    Sets the address on the local side of a connection to address.

    You can call this function in a subclass of QAbstractSocket to change the return value of the localAddress() 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 address of the socket prior to a connection (e.g., QUdpSocket::bind()).

    This function was introduced in Qt 4.1.
    Which suggested to me that this didn't effect the socket binding. I may try giving it a whirl see what happens.

    Like I say once the network architecture is fixed the issue may not be relevant as the routing tables would take care of it all. After posting yesterday I did manage to persuade my colleagues that the planned network architecture wouldn't work.
    Last edited by Banfa; 2nd June 2009 at 10:27.

Similar Threads

  1. Tell QTcpSocket which interface to use
    By rianquinn in forum Qt Programming
    Replies: 7
    Last Post: 23rd December 2010, 17:28
  2. Replies: 4
    Last Post: 2nd September 2007, 19:48

Tags for this Thread

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.