Results 1 to 2 of 2

Thread: QT Network htonl

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    68
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question QT Network htonl

    I have a data coming from a server on a TCP Connection and the data comes in network byte order.
    is there any specific class in Qt that performs this conversion or should i use the native ntohs() methods of linux.

    i tried using the native method call but that doesnot give any change!
    can anyone please enlighten me on this....

    Qt Code:
    1. struct{
    2. quint16 i;
    3. }
    4. tcp->read((char*)i,sizeof(i));
    5. ntohs(i);
    To copy to clipboard, switch view to plain text mode 

    i am working in QT4.2.2 Red Hat Linux
    Last edited by csvivek; 9th May 2008 at 16:11. Reason: updated contents

Similar Threads

  1. Checking network availability
    By fullmetalcoder in forum Qt Programming
    Replies: 2
    Last Post: 10th March 2008, 19:23
  2. No network when Modem Emulator connect to a real device
    By tommy_tang in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 10th December 2007, 08:24
  3. Send QEvents over network?
    By Winni in forum Qt Programming
    Replies: 2
    Last Post: 2nd October 2007, 20:58
  4. qmake ignores network?
    By Morea in forum Qt Programming
    Replies: 2
    Last Post: 24th June 2007, 09:29
  5. QSocket - signal for network wire disconnection
    By manivannan_1984 in forum Qt Programming
    Replies: 7
    Last Post: 5th September 2006, 13: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
  •  
Qt is a trademark of The Qt Company.