You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.
This interface provides a set of network utility functions. It duplicates many of the
nsIProtocolHandlermethods in a protocol handler independent way (e.g., NewURI inspects the scheme in order to delegate creation of the new URI to the appropriate protocol handler).
nsIIOServicealso provides a set of URL parsing utility functions. These are provided as a convenience to the programmer and in some cases to improve performance by eliminating intermediate data structures and interfaces. It is scriptable.
Constructs a new URI by determining the scheme of the URI spec, and then delegating the construction of the URI to the protocol handler for that scheme. QueryInterface can be used on the resulting URI object to obtain a more specific type of URI.
nsIChannel nsIIOService::newChannel(in AUTF8String aSpec, in string aOriginCharset, in nsIURI aBaseURI)A reference to the new
Checks if a port number is banned. This involves consulting a list of unsafe ports, corresponding to network services that may be easily exploitable. If the given port is considered unsafe, then the protocol handler (corresponding to
aScheme) will be asked whether it wishes to override the IO service's decision to block the port. This gives the protocol handler ultimate control over its own security policy while ensuring reasonable, default protection.
Note: Most URL parsing is done via
nsIURI, and in fact the scheme can also be extracted from a URL string via
nsIURI. This method is provided purely as an optimization.
TRUEif networking is in "offline" mode,
FALSEotherwise. When in offline mode, attempts to access the network will fail (although this is not necessarily corrolated with whether there is actually a network available -- that's hard to detect without causing the dialer to come up).
| Written by:Ellen Evans | Comments, questions, complaints?