W3C libwww LibGuide

Protocol Modules

A protocol module is invoked by the HTAccess module in order to access a document. Each protocol module is responsible for handling the transmission of a data object either from the application to a remote server, or vice verse.

The protocol modules are registered dynamically (using static linking) and the User's Guide describes how modules can be registered. Each protocol module is responsible for establishing the connection to the remote server (or the local file-system) and extract information using a specific access method. When data arrives from the network, it is passed on to the format manager.

Most of the protocol modules are now implemented as state machines in order to support libwww Threads. When the client parses a request to the library a HTRequest Structure is filled out and parsed to a load function in the access manager, for example HTLoadAnchor. HTRequest contains all information needed by the Library in order to fulfill a request.

File access
This module provides access to files on a local file system. Due to general confusion of the "file://" access scheme in the URL Specifications tries FTP access on failure.
FTP access
This is a complete state based FTP client which is capable of communicating with a lot of weird FTP servers. It uses PASV as the default method for establishing the data connection as PORT does not work if the application is run from a firewall machine, as is often the case with proxy server.
HTTP access
The HTTP module handles document search and retrieve using the HTTP protocol. See also information on the current implementation of the HTTP client. The module is now a complete state machine which is a required functionality in the libwww thread model. It uses streams for both outgoing and incoming data, the outgoing stream is implemented in HTTPReq.c and the incoming stream in HTTP.c
News access
The NNTP internet news protocol is handled by HTNews which builds a hypertext object.

This module is under reconstruction!

Gopher access
The internet gopher access to menus and flat files (and links to telnet nodes, WhoIs servers, CSO Name Server etc.) is handled by HTGopher Module.
Telnet access
This module provides the possibility of running telnet sessions in a subshell. It also provides functionality for rlogin and tn3270.
WAIS access
WAIS access is not compiled into the Library by default as it requires the freeWAIS library. This is easily changed in the platform dependent Makefile.include in the
	WWW/All/<platform⁢
directory. However, if this library is present then the application can communicate directly with a WAIS server. Otherwise it must go through a gateway program.


Henrik Frystyk, libwww@w3.org, @(#) $Id: Protocol.html,v 1.17 1996/12/09 03:21:43 jigsaw Exp $