Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nsISocketTransport arguments...

14 views
Skip to first unread message

zen

unread,
Jan 3, 2006, 12:02:31 AM1/3/06
to
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

Christian Biesinger

unread,
Jan 3, 2006, 8:37:24 AM1/3/06
to
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

zen

unread,
Jan 3, 2006, 8:24:20 PM1/3/06
to
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?

Christian Biesinger

unread,
Jan 4, 2006, 4:39:45 PM1/4/06
to
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.


0 new messages