Results 1 to 2 of 2

Thread: Need help reagding QTcpsocket (plzzz)

  1. #1
    Join Date
    Feb 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Need help reagding QTcpsocket (plzzz)

    Hi All,

    I have a application which will take the hostname and the port ID as input and connect
    to the console . I am using QtcpSocket to connect and reading data.

    As per new requirment I need to connect to a sever / a unix machine (BSD ) and run a
    command on it remotely and get the output and reflect it on the lineEdit.

    The problem I am facing is that

    I need to telnet to the machine and give the userID and Password to authenticate.

    for example the BSD machine IP - 10.72.185.187 and telnet port -23

    I have searched all over the qtcenter for help on how to send user name and password..
    but I didnt found any posts on it.

    I am able to progress untill connect to the host but not able to figure out how to send userid and password..

    I have gone through different options like QtAuth.. QtProxy...etc , but thses wont help me ..I need to read data form a UNIX machine and all these things help for Http/Ftp.

    Please help me in finding the solution ....any kind of help will be highly appricated .. i am stuck

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Need help reagding QTcpsocket (plzzz)

    As QTcpSocket is a subclass of QIODevice, you can send data with QIODevice::write() and read by QIODevice::read() and some of it's modifications (readLine() and so on).
    Then you have to send data that is defined by a Telnet protocol, so you have to search for some Telnet protocol tutorial (where QtCentre is rather about Qt than network protocols :])

    Maybe this can help:
    http://en.wikipedia.org/wiki/Telnet
    http://support.microsoft.com/kb/231866
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

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.