Network

The following list interfaces for reading and writing remote content. Remote content is identified by a URI using the nsIURI interface. Use the nsIIOService service to create one from a string. The nsIIOService service is also used to create channels for reading. Channels are created based on the URI scheme (http or ftp, for instance).

Each channel interface has a number of methods specific to the type of channel. Data can be read using a stream obtained from the channel. The nsIUploadChannel interface can be used to upload to a channel. You can call QueryInterface on a channel to get an nsIUploadChannel if it is supported.

Jump to:


Base Interfaces

These are the main network interfaces used.

nsIFileURL
nsIIOService
nsILoadGroup
nsIProgressEventSink
nsIRequest
nsIRequestObserver
nsIRequestObserverProxy
nsIStandardURL
nsITransport
nsITransportEventSink
nsITransportSecurityInfo
nsIURI
nsIURILoader
nsIURL

@mozilla.org/network/file-transport-service;1
@mozilla.org/network/io-service;1


Channels

A channel is used as a connection to a local or remote URL.

nsICachingChannel
nsIChannel
nsIDataChannel
nsIEncodedChannel
nsIFTPChannel
nsIFileChannel
nsIHttpChannel
nsIHttpChannelInternal
nsIInputStreamChannel
nsIJARChannel
nsIMultiPartChannel
nsIResumableChannel
nsIStreamIOChannel
nsIUploadChannel
nsIViewSourceChannel
nsIWyciwygChannel

Protocol Handlers

A protocol handler can be retrieved using the nsIIOService interface. It provides additional information about a protocol (URI scheme).

nsIExternalProtocolHandler
nsIExternalProtocolService
nsIFileProtocolHandler
nsIHttpProtocolHandler
nsIJARProtocolHandler
nsIProtocolHandler
nsIProxiedProtocolHandler
nsIResProtocolHandler

Streams

Some stream handling interfaces. Most stream interfaces are listed in the Files and Streams group.

nsIAsyncStreamCopier
nsIAsyncStreamListener
nsIInputStreamPump
nsISimpleStreamListener
nsISimpleStreamProvider
nsIStreamConverter
nsIStreamConverterService
nsIStreamLoader
nsIStreamLoaderObserver
nsIStreamProvider
nsIStreamProviderProxy
nsIStreamTransportService
nsISyncStreamListener
nsIUnicharStreamLoader
nsIUnicharStreamLoaderObserver

@mozilla.org/network/async-stream-copier;1
@mozilla.org/network/async-stream-listener;1
@mozilla.org/network/input-stream-channel;1
@mozilla.org/network/input-stream-io;1
@mozilla.org/network/input-stream-pump;1
@mozilla.org/network/simple-stream-listener;1
@mozilla.org/network/simple-stream-provider;1
@mozilla.org/network/stream-io-channel;1
@mozilla.org/network/stream-listener-proxy;1
@mozilla.org/network/stream-listener-tee;1
@mozilla.org/network/stream-loader;1
@mozilla.org/network/stream-provider-proxy;1
@mozilla.org/network/stream-transport-service;1
@mozilla.org/network/sync-stream-listener;1
@mozilla.org/network/unichar-stream-loader;1


Sockets

Some socket interfaces.

nsISOCKS4SocketInfo
nsISOCKS4SocketProvider
nsISOCKSSocketInfo
nsISOCKSSocketProvider
nsISSLSocketControl
nsISSLSocketProvider
nsIServerSocket
nsIServerSocketListener
nsISocketEventHandler
nsISocketProvider
nsISocketProviderService
nsISocketTransport
nsISocketTransportService

@mozilla.org/network/server-socket;1
@mozilla.org/network/socket-provider-service;1
@mozilla.org/network/socket-transport-service;1
@mozilla.org/network/socket;1?type=ipc
@mozilla.org/network/socket;1?type=socks
@mozilla.org/network/socket;1?type=socks4
@mozilla.org/network/socket;2?type=socks
@mozilla.org/network/socket;2?type=socks4
@mozilla.org/network/socket;2?type=ssl
@mozilla.org/network/socket;2?type=starttls


Download and Content Handling Interfaces

These interfaces handle downloading content and launching helper applications.

nsIContentHandler
nsIDownload
nsIDownloadObserver
nsIDownloader
nsIExternalHelperAppService
nsIURIContentListener
nsPIExternalAppLauncher

@mozilla.org/download;1
@mozilla.org/network/downloader;1
@mozilla.org/uriloader/external-helper-app-service;1
@mozilla.org/uriloader/external-protocol-service;1
@mozilla.org/uriloader/psm-external-content-listener;1


Content Handling Components

These components handle loading content of various types.

@mozilla.org/uriloader/content-handler;1?type=application/http-index-format
@mozilla.org/uriloader/content-handler;1?type=application/vnd.mozilla.xul+xml
@mozilla.org/uriloader/content-handler;1?type=application/x-xpinstall
@mozilla.org/uriloader/content-handler;1?type=application/xhtml+xml
@mozilla.org/uriloader/content-handler;1?type=application/xml
@mozilla.org/uriloader/content-handler;1?type=image/bmp
@mozilla.org/uriloader/content-handler;1?type=image/gif
@mozilla.org/uriloader/content-handler;1?type=image/jpeg
@mozilla.org/uriloader/content-handler;1?type=image/jpg
@mozilla.org/uriloader/content-handler;1?type=image/png
@mozilla.org/uriloader/content-handler;1?type=image/x-icon
@mozilla.org/uriloader/content-handler;1?type=image/x-jng
@mozilla.org/uriloader/content-handler;1?type=image/x-xbitmap
@mozilla.org/uriloader/content-handler;1?type=text/css
@mozilla.org/uriloader/content-handler;1?type=text/html
@mozilla.org/uriloader/content-handler;1?type=text/plain
@mozilla.org/uriloader/content-handler;1?type=text/rdf
@mozilla.org/uriloader/content-handler;1?type=text/xml
@mozilla.org/uriloader/content-handler;1?type=video/x-mng
@mozilla.org/uriloader/content-handler;1?type=x-application-addvcard
@mozilla.org/uriloader/content-handler;1?type=x-application-imapfolder
@mozilla.org/uriloader/content-handler;1?type=x-application-irc
@mozilla.org/uriloader/content-handler;1?type=x-application-jsd
@mozilla.org/uriloader/content-handler;1?type=x-application-mailto
@mozilla.org/uriloader/content-handler;1?type=x-application-newsgroup
@mozilla.org/uriloader/content-handler;1?type=x-application-newsgroup-listids
@mozilla.org/uriloader/content-handler;1?type=x-message-display

Cache

These interfaces are used for handling the caching of files. The nsIPrefetchService interface can be used to prefetch and cache files in the background.

nsICache
nsICacheDeviceInfo
nsICacheEntryDescriptor
nsICacheEntryInfo
nsICacheListener
nsICacheMetaDataVisitor
nsICacheService
nsICacheSession
nsICacheVisitor
nsIPrefetchService

@mozilla.org/network/cache-service;1
@mozilla.org/prefetch-service;1


Proxies

The following interfaces are used for proxies and firewall handling.

nsIProtocolProxyService
nsIProxy
nsIProxyAutoConfig
nsIProxyCreateInstance
nsIProxyInfo
nsIProxyObjectManager

@mozilla.org/network/protocol-proxy-service;1
@mozilla.org/network/proxy-auto-config;1
@mozilla.org/network/proxy_autoconfig;1
@mozilla.org/xpcomproxy;1


ZIP and JAR Files

The following interfaces are intended for reading from ZIP and JAR files.

nsIJAR
nsIJARURI
nsIZipEntry
nsIZipReader
nsIZipReaderCache

@mozilla.org/libjar/zip-reader-cache;1
@mozilla.org/libjar/zip-reader;1


Network Utilities

Some additional network interfaces.

nsIAboutModule
nsIAuthModule
nsIByteRangeRequest
nsIDNSListener
nsIDNSRecord
nsIDNSRequest
nsIDNSService
nsIDirIndex
nsIDirIndexListener
nsIDirIndexParser
nsIDirectoryListing
nsIFTPEventSink
nsIFileTransportService
nsIHTTPHeaderListener
nsIHTTPIndex
nsIHttpAuthManager
nsIHttpAuthenticator
nsIHttpEventSink
nsIHttpHeaderVisitor
nsIHttpNotify
nsIIDNService
nsIMIMEInfo
nsIMIMEInputStream
nsIMIMEService
nsINetModRegEntry
nsINetModuleMgr
nsINetNotify
nsIRefreshURI
nsIResumableEntityID
nsISecretDecoderRing
nsISecretDecoderRingConfig
nsISecureBrowserUI
nsISecurityEventSink
nsIURIChecker
nsIURLParser

Additional Network Components

Some additional network components.

@mozilla.org/dirIndex;1
@mozilla.org/dirIndexParser;1
@mozilla.org/mime-info;1
@mozilla.org/mime;1
@mozilla.org/network/auth-module;1?name=ntlm
@mozilla.org/network/dns-service;1
@mozilla.org/network/http-auth-manager;1
@mozilla.org/network/http-authenticator;1?scheme=basic
@mozilla.org/network/http-authenticator;1?scheme=digest
@mozilla.org/network/http-authenticator;1?scheme=ntlm
@mozilla.org/network/idn-service;1
@mozilla.org/network/io-thread-pool;1
@mozilla.org/network/load-group;1
@mozilla.org/network/local-file-channel;1
@mozilla.org/network/mime-hdrparam;1
@mozilla.org/network/mime-input-stream;1
@mozilla.org/network/net-extern-mod;1
@mozilla.org/network/request-observer-proxy;1
@mozilla.org/network/resumable-entity-id;1
@mozilla.org/network/simple-uri;1
@mozilla.org/network/standard-url;1
@mozilla.org/network/storage-transport;1
@mozilla.org/network/urichecker;1
@mozilla.org/network/url-parser;1?auth=maybe
@mozilla.org/network/url-parser;1?auth=no
@mozilla.org/network/url-parser;1?auth=yes
@mozilla.org/uriloader;1
@mozilla.org/xpfe/http-index-format-factory-constructor

Protocols

The following components each handle a single URL scheme supported by Mozilla, for example 'http' or 'file'.

@mozilla.org/network/protocol;1?name=about
@mozilla.org/network/protocol;1?name=addbook
@mozilla.org/network/protocol;1?name=chrome
@mozilla.org/network/protocol;1?name=cid
@mozilla.org/network/protocol;1?name=data
@mozilla.org/network/protocol;1?name=default
@mozilla.org/network/protocol;1?name=file
@mozilla.org/network/protocol;1?name=ftp
@mozilla.org/network/protocol;1?name=gopher
@mozilla.org/network/protocol;1?name=http
@mozilla.org/network/protocol;1?name=https
@mozilla.org/network/protocol;1?name=imap
@mozilla.org/network/protocol;1?name=irc
@mozilla.org/network/protocol;1?name=jar
@mozilla.org/network/protocol;1?name=javascript
@mozilla.org/network/protocol;1?name=keyword
@mozilla.org/network/protocol;1?name=mailbox
@mozilla.org/network/protocol;1?name=mailto
@mozilla.org/network/protocol;1?name=moz-bitmap
@mozilla.org/network/protocol;1?name=news
@mozilla.org/network/protocol;1?name=nntp
@mozilla.org/network/protocol;1?name=pop
@mozilla.org/network/protocol;1?name=resource
@mozilla.org/network/protocol;1?name=snews
@mozilla.org/network/protocol;1?name=view-source
@mozilla.org/network/protocol;1?name=wyciwyg
@mozilla.org/network/protocol;1?name=x-jsd

About Handlers

The following components each handle an about URL, for example about:mozilla.

@mozilla.org/network/protocol/about;1?what=
@mozilla.org/network/protocol/about;1?what=about
@mozilla.org/network/protocol/about;1?what=blank
@mozilla.org/network/protocol/about;1?what=bloat
@mozilla.org/network/protocol/about;1?what=buildconfig
@mozilla.org/network/protocol/about;1?what=cache
@mozilla.org/network/protocol/about;1?what=cache-entry
@mozilla.org/network/protocol/about;1?what=config
@mozilla.org/network/protocol/about;1?what=credits
@mozilla.org/network/protocol/about;1?what=logo
@mozilla.org/network/protocol/about;1?what=mozilla
@mozilla.org/network/protocol/about;1?what=plugins

Stream Converters

The stream converters convert MIME encoded content.

@mozilla.org/streamConverters;1
@mozilla.org/streamconv;1?from=application/http-index-format&to;=text/html
@mozilla.org/streamconv;1?from=application/mac-binhex40&to;=*/*
@mozilla.org/streamconv;1?from=application/x-unknown-content-type&to;=*/*
@mozilla.org/streamconv;1?from=compress&to;=uncompressed
@mozilla.org/streamconv;1?from=deflate&to;=uncompressed
@mozilla.org/streamconv;1?from=gzip&to;=uncompressed
@mozilla.org/streamconv;1?from=message/rfc822&to;=*/*
@mozilla.org/streamconv;1?from=message/rfc822&to;=application/vnd.mozilla.xul+xml
@mozilla.org/streamconv;1?from=message/rfc822&to;=text/html
@mozilla.org/streamconv;1?from=multipart/byteranges&to;=*/*
@mozilla.org/streamconv;1?from=multipart/mixed&to;=*/*
@mozilla.org/streamconv;1?from=multipart/x-mixed-replace&to;=*/*
@mozilla.org/streamconv;1?from=text/ftp-dir&to;=application/http-index-format
@mozilla.org/streamconv;1?from=text/gopher-dir&to;=application/http-index-format
@mozilla.org/streamconv;1?from=text/plain&to;=text/html
@mozilla.org/streamconv;1?from=x-compress&to;=uncompressed
@mozilla.org/streamconv;1?from=x-gzip&to;=uncompressed

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com