Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes
nsSOCKSSocketProvider Class Reference

#include <nsSOCKSSocketProvider.h>

Inheritance diagram for nsSOCKSSocketProvider:
Inheritance graph
[legend]
Collaboration diagram for nsSOCKSSocketProvider:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSISOCKETPROVIDER 
nsSOCKSSocketProvider (PRUint32 version)
virtual ~nsSOCKSSocketProvider ()
void newSocket (in long aFamily, in string aHost, in long aPort, in string aProxyHost, in long aProxyPort, in unsigned long aFlags, out PRFileDescStar aFileDesc, out nsISupports aSecurityInfo)
 newSocket
void addToSocket (in long aFamily, in string aHost, in long aPort, in string aProxyHost, in long aProxyPort, in unsigned long aFlags, in PRFileDescStar aFileDesc, out nsISupports aSecurityInfo)
 addToSocket

Static Public Member Functions

static NS_METHOD CreateV4 (nsISupports *, REFNSIID aIID, void **aResult)
static NS_METHOD CreateV5 (nsISupports *, REFNSIID aIID, void **aResult)

Public Attributes

const long PROXY_RESOLVES_HOST = 1 << 0
 PROXY_RESOLVES_HOST.

Private Attributes

PRUint32 mVersion

Detailed Description

Definition at line 52 of file nsSOCKSSocketProvider.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSISOCKETPROVIDER nsSOCKSSocketProvider::nsSOCKSSocketProvider ( PRUint32  version) [inline]

Definition at line 58 of file nsSOCKSSocketProvider.h.

Here is the caller graph for this function:

virtual nsSOCKSSocketProvider::~nsSOCKSSocketProvider ( ) [inline, virtual]

Definition at line 59 of file nsSOCKSSocketProvider.h.

{}

Member Function Documentation

void nsISocketProvider::addToSocket ( in long  aFamily,
in string  aHost,
in long  aPort,
in string  aProxyHost,
in long  aProxyPort,
in unsigned long  aFlags,
in PRFileDescStar  aFileDesc,
out nsISupports  aSecurityInfo 
) [inherited]

addToSocket

This function is called to allow the socket provider to layer a PRFileDesc on top of another PRFileDesc. For example, SSL via a SOCKS proxy.

Parameters are the same as newSocket with the exception of aFileDesc, which is an in-param instead.

NS_METHOD nsSOCKSSocketProvider::CreateV4 ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 53 of file nsSOCKSSocketProvider.cpp.

{
    nsresult rv;
    nsCOMPtr<nsISocketProvider> inst =
            new nsSOCKSSocketProvider(NS_SOCKS_VERSION_4);
    if (!inst)
        rv = NS_ERROR_OUT_OF_MEMORY;
    else
        rv = inst->QueryInterface(aIID, aResult); 
    return rv;
}
NS_METHOD nsSOCKSSocketProvider::CreateV5 ( nsISupports *  aOuter,
REFNSIID  aIID,
void **  aResult 
) [static]

Definition at line 66 of file nsSOCKSSocketProvider.cpp.

{
    nsresult rv;
    nsCOMPtr<nsISocketProvider> inst =
            new nsSOCKSSocketProvider(NS_SOCKS_VERSION_5);
    if (!inst)
        rv = NS_ERROR_OUT_OF_MEMORY;
    else
        rv = inst->QueryInterface(aIID, aResult); 
    return rv;
}

Here is the call graph for this function:

void nsISocketProvider::newSocket ( in long  aFamily,
in string  aHost,
in long  aPort,
in string  aProxyHost,
in long  aProxyPort,
in unsigned long  aFlags,
out PRFileDescStar  aFileDesc,
out nsISupports  aSecurityInfo 
) [inherited]

newSocket

Parameters:
aFamilyThe address family for this socket (PR_AF_INET or PR_AF_INET6).
aHostThe hostname for this connection.
aPortThe port for this connection.
aProxyHostIf non-null, the proxy hostname for this connection.
aProxyPortThe proxy port for this connection.
aFlagsControl flags that govern this connection (see below.)
aFileDescThe resulting PRFileDesc.
aSecurityInfoAny security info that should be associated with aFileDesc. This object typically implements nsITransportSecurityInfo.

Member Data Documentation

Definition at line 65 of file nsSOCKSSocketProvider.h.

PROXY_RESOLVES_HOST.

This flag is set if the proxy is to perform hostname resolution instead of the client. When set, the hostname parameter passed when in this interface will be used instead of the address structure passed for a later connect et al. request.

Definition at line 108 of file nsISocketProvider.idl.


The documentation for this class was generated from the following files: