Results 1 to 2 of 2

Thread: QTCPSocket on WinCE/S60

  1. #1
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default QTCPSocket on WinCE/S60

    I am trying to connect to server using QTCPSocket::connectToHost. On WinCE and s60 devices. If I uses comparitively high network protocols(WiFi), is goes well.

    But when I uses slow network protocols (gprs, hspda, umts, edge). It fails in connection.
    Does anyone here face this issue, using QTCPSocket ?

    Qt Code:
    1. #include <QApplication>
    2. #include <QMessageBox>
    3. #include <QTcpSocket>
    4.  
    5. //#define API_URL "www.google.com"
    6. #define API_URL "64.233.189.99"
    7.  
    8. int main(int argc, char *argv[])
    9. {
    10. QApplication a(argc, argv);
    11. QTcpSocket sock;
    12. sock.connectToHost(API_URL, 80);
    13. if(!sock.waitForConnected())
    14. {
    15. QMessageBox::information(0,0,"Failed");
    16. return false;
    17. }
    18. QMessageBox::information(0,0,"Connected");
    19. return 0;
    20. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTCPSocket on WinCE/S60

    What is the error on the socket?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Challenging QTcpSocket reliability problem
    By Raccoon29 in forum Qt Programming
    Replies: 3
    Last Post: 13th January 2009, 10:38
  2. array of pointers to QtcpSocket
    By gQt in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 16th June 2008, 09:15
  3. QTcpServer & QTcpSocket questions...
    By jxmot in forum Qt Programming
    Replies: 2
    Last Post: 24th April 2008, 21:38
  4. QTcpSocket and libssh2 ...
    By sandros in forum Qt Programming
    Replies: 6
    Last Post: 21st November 2007, 22:34
  5. Strange QTcpSocket behavior (debugged with Ethereal)
    By mdecandia in forum Qt Programming
    Replies: 23
    Last Post: 28th May 2007, 20:44

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.