Results 1 to 3 of 3

Thread: How to free for re-using a socketDescriptor

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Posts
    34
    Qt products
    Qt4
    Platforms
    Windows

    Default How to free for re-using a socketDescriptor

    Hello,

    OK, title was hard to find, but here is my problem:
    I'm using QTcpServer and QTcpSocket for creating higher-level classes.
    When a connection is etablished, I need to send the socketDescriptor of a connected QTcpSocket (gived by the nextPendingConnection function of QTcpServer) to another class for creating a new socket instance.
    I have no problems under windows, but I encounter some problems under Linux and I can't receive any data. I think the problem is from this:
    We can read this in the Qt Documentation: Note: It is not possible to initialize two abstract sockets with the same native socket descriptor.
    But nothing about how to "free" a socketDescriptor for using it in another class (or thread).
    Last edited by erqsor; 27th December 2011 at 17:46.

Similar Threads

  1. Replies: 8
    Last Post: 11th September 2010, 10:41
  2. Same port when you pass socketDescriptor?
    By Dumbledore in forum Qt Programming
    Replies: 3
    Last Post: 11th December 2007, 22:03
  3. Free()
    By AnithaRagupathy in forum Newbie
    Replies: 1
    Last Post: 14th October 2007, 09:17
  4. What to free or not to free, that is the question
    By bruccutler in forum Qt Programming
    Replies: 1
    Last Post: 25th July 2007, 05:04
  5. to free or not to free
    By masoroso in forum Newbie
    Replies: 1
    Last Post: 17th April 2006, 18:56

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.