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.



Is Necko the right networking library for my application?
Darin Fisher <darin@netscape.com>
December 19, 2001

The mozilla networking library, Necko, provides a full featured networking library, but it also carries with it some baggage.  It is built using XPCOM (a simplified cross-platform component object model), and
  • There is no way to use Necko without using XPCOM.
  • Necko is not distributed as a stand alone library.
  • Necko relies on other Mozilla components for supporting functionality (eg. preferences, cookies, ...).
  • Necko must currently be compiled within the Mozilla framework.
  • Necko requires a modern C++ compiler that, for example, has basic (ie. not necessarily complete) support for templates.
  • Necko's API cannot be invoked from multiple application threads (you'll have to write code to marshall all necko calls to a single thread if you wish to use Necko in a multithreaded application).
  • Necko's API is not frozen.
  • Necko has many bugs (go to http://bugzilla.mozilla.org/ and query the Networking components :-[ ).
That being said, if you're target environment is supported by Mozilla, and none of the issues I've listed here pose a problem for you, then perhaps Necko might be a good fit for you.  There are a number of benefits if you go with Necko:
  • Necko is well supported and ever evolving.
  • Necko development is focused on performance and standards compliance.
  • Necko uses NSS for HTTPS connections (note: Necko is not compiled against NSS... it uses PSM, which "plugs" itself into Necko).
  • Necko is very customizable, powerful, and robust.
  • Necko has gone through extensive field testing and revision to maximize website compatibility.
  • Necko provides asynchronous DNS.
  • Necko provides configurable disk and memory web caching.
  • Necko provides support for web proxies, including PAC.
  • Necko runs on many platforms.
If these features are important to you, and you're willing to roll up your sleaves to make Necko work in your environment, then perhaps it is the right fit for you.  There are plenty of folks working with mozilla who would be more than willing to help you through the bumps.