Necko is a platform-independent API for several layers of networking (transport to presentation) that is built on XPCOM. It is currently in use in Mozilla and all of its clients.
- Built on XPCOM and NSPR - Not a stand-alone library
- Implemented mainly in C++
- Continually evolving (quite drastically!)
- Originally located at mozilla/network. This version is now completely deprecated.
- Now located at mozilla/netwerk.
Necko has several important pieces:
- Provides network utility functions.
- Manages nsIProtocolHandler implementations.
- Creates nsIURI objects from URI strings.
- Represents a URI (scheme://host/path).
- Parent class of nsIURL, which is implemeted by nsStandardURL, which handles standard URL operations.
- Manages a single protocol based on a scheme (e.g. http).
- Uses nsIURI instance to create nsIChannel.
- Uses nsIURI information to create logical connection to resource.
- Listener for connection start, arrival of data, and stop request.
- Represents physical connection (e.g. file descriptor, socket).