1 Introduction

The HttpClient package implements the HTTP 0.9 and HTTP 1.0 protocols, conform RFC 1945 with some limitations (see Chapter 5), providing a flexible programming interface. Its interface is related with the retrieving of the documents over the network, as well as with accessing their transmission rate (see Chapter 2).

Chapter 3 describes some basic examples using the classes and functionality of the HttpClient package.

Chapter 4 provides some concrete applications using the classes and functionality of the HttpClient package.

Chapter 5 describes the limitations HttpClient package has when compared with HTTP 1.0 protocol.

The HttpClient package (mesaros-httpclient.pkg) was written in Mozart/Oz 3.

1.1 Self-clocking with the rate stream

The HTTPClient module provides a clock signal that is useful for clocking applications that use the module. The clock signal is output as a dataflow stream, called RateStrm (see Section 2.7.2).

A new stream element is added whenever new information is known about the data transmission rate, i.e., whenever a TCP read operation succeeds in the network layer. The stream can be read by a simple loop that iterates over its elements. Dataflow execution guarantees that the iteration will block if necessary until stream elements arrive. The stream's clock rate depends on how frequently the host machine updates its network buffer. The rate is typically several tens of stream elements per second, for an uncongested network.

The actual network bandwidth does not depend on this rate, but depends mainly on the physical properties of the network and its load; for example, on our Internet connection we measure typical bandwidths from less than one to several hundred kilobytes per second.

1.2 Installation

The package can be installed with the ozmake tool that, lately, is delivered with the Mozart tarballs.

The package will be installed by default in directory "~/.oz" .


Valentin Mesaros