Results 1 to 2 of 2

Thread: Socket Descriptor

  1. #1

    Arrow Socket Descriptor

    I have few questions about QLocalSocket's Socket Descriptor.

    Can I use it as identifier?

    How do I set it? Like this?

    QString socketDescriptor = "test_socket";
    socket->setSocketDescriptor(quintptr(&socketDescriptor) );

    And how do I read from it, i.e. how do I convert quintptr to qstring*?

  2. #2
    Join Date
    Mar 2009
    Location
    Leiden, The Netherlands
    Posts
    10
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Socket Descriptor

    To me it appears that the socket descriptor is used like a file descriptor (http://en.wikipedia.org/wiki/Berkeley_sockets)

    The reason you can set it is suggests to me that you can assign i.e. an existing socket descriptor to a new QLocalSocket instance.

    It is certainly something you don't want to edit, but you can use it as a reference, if you like.

Similar Threads

  1. Replies: 1
    Last Post: 5th September 2008, 11:36
  2. Greenphone mini USB socket problem
    By izico in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 25th September 2007, 11:59
  3. Socket bind error
    By rburge in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2007, 00:18
  4. Difference between normal socket and QTcpSocket
    By ShaChris23 in forum Newbie
    Replies: 1
    Last Post: 16th June 2007, 04:38
  5. How to write on a socket in another thread?
    By Valheru in forum Qt Programming
    Replies: 7
    Last Post: 12th October 2006, 10:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.