ICI Modules: net

Modules by name : by type


The net module provides an ICI interface to BSD sockets, i.e, Unix network system calls. Due to laws of nature this module is also available on Windows but does not attempt to hide Windows sockets differences from other sockets implementations. Several functions are missing from the Windows version.

Socket Objects

The module provides a new type, socket, that represents, a socket connection. Sockets objects are a simple wrapper around the underlying system's way of defining a socket - a file descriptor on Unix or a SOCKET handle for Windows. Sockets are garbage collected like all other ICI objects and if a socket is collected and still open the socket is closed with any errors ignored. It should be remembered that sockets represent external OS resources. It is not good practice to rely upon garbage collection to close sockets, explicit closure is required for reliable, determistic programs.

Network Addresses

The ICI net module uses strings to define network addresses with conventions adopted as to their interpretation. These strings are converted to and from internal forms as required. The format of network addresses is described here.