How to create push type stream object from a URL.



  • Hi All,

    This is my first day when I am going to start my development using qt because it is an excellent framework to develop cross plattform applications.

    As per my first task is concerned I would like to create a push type stream object from a given URL.
    Currently I wrote one application on windows and using one API called "URLOpenStream" from urlmon.dll library.
    How can I achieve the same functionality using qt, because I wanted to run same piece of code in LiNUX too without any code changes.

    Please advice...
    Thanks in advance.

    Regards
    Ashish



  • Well, I'm not quite sure what a push type stream object should be but if it is about downloading files from a remote location you can either use

    • QNetworkAccessManager for HTTP operations or
    • QTcpSocket or QUdpSocket for low-level data transfer.

    In addition you might elaborate your problem so we can give you a better advice.



  • Hi,

    Thanks a lot for your quick response. I have gone through the QNetworkManager and QNetworkReply class docs and found that It will signal me "readReady" whenver be data is available on the network from that URL. Sounds similar to what I am looking for. I have to give a try and then I will come back.

    One more question here is, if I will use QTcpSocket in my client application and suppose if my server has written his implementation using windows socket API, in that case shall I be able to communicate with that server or not.?

    Regards
    Ashish



  • They should.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.