nsISocketTransport arguments...

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

nsISocketTransport arguments...

zen-3
Hi all,

I can use nsISocketTransport for normal http GET, however I facing
problem when pointing to a binary file located in https server.

How can I set the arguments of the CreateTransport() if i need Https
connection through nsISocketTransport?

Can I use nsISocketTransport to download a binary file? What other
preferable method?

please advice.
-zen
_______________________________________________
Mozilla-netlib mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-netlib
Reply | Threaded
Open this post in threaded view
|

Re: nsISocketTransport arguments...

Christian Biesinger
zen wrote:
> How can I set the arguments of the CreateTransport() if i need Https
> connection through nsISocketTransport?

Use "ssl" as the socket type (i.e. pass an array containing "ssl" as the
aSocketTypes argument)

> Can I use nsISocketTransport to download a binary file? What other
> preferable method?

Yeah, that should work fine (although if you are using JavaScript,
handling binary data won't be fun). But if you just want to use HTTP,
then I would suggest using the normal nsIChannel interfaces
(nsIIOService::newChannel etc).

-biesi
_______________________________________________
Mozilla-netlib mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-netlib
Reply | Threaded
Open this post in threaded view
|

Re: nsISocketTransport arguments...

zen-3
In reply to this post by zen-3
Christian Biesinger wrote:
> zen wrote:
>
>> How can I set the arguments of the CreateTransport() if i need Https
>> connection through nsISocketTransport?
>
>
> Use "ssl" as the socket type (i.e. pass an array containing "ssl" as the
> aSocketTypes argument)
>
Should I use the SSL port as well, or just 80 will do?
Should I use SSL protocol to establish connection instead the normal
http GET?


>> Can I use nsISocketTransport to download a binary file? What other
>> preferable method?
>
>
> Yeah, that should work fine (although if you are using JavaScript,
> handling binary data won't be fun). But if you just want to use HTTP,
> then I would suggest using the normal nsIChannel interfaces
> (nsIIOService::newChannel etc).
>
> -biesi
_______________________________________________
Mozilla-netlib mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-netlib
Reply | Threaded
Open this post in threaded view
|

Re: nsISocketTransport arguments...

Christian Biesinger
zen wrote:
> Should I use the SSL port as well, or just 80 will do?
> Should I use SSL protocol to establish connection instead the normal
> http GET?

Port 443... And just send a GET as usual, Necko will take care of the
SSL stuff.


_______________________________________________
Mozilla-netlib mailing list
[hidden email]
http://mail.mozilla.org/listinfo/mozilla-netlib