OCamlnet is an enhanced system platform library for Ocaml. As the name
suggests, large parts of it have to do with network programming, but
it is actually not restricted to this. Other parts deal with the
management of multiple worker processes, and the interaction with
other programs running on the same machine. You can also view Ocamlnet
as an extension of the system interface as provided by the Unix
module of the standard library.
Overview: What you can do with OCamlnet:
Domain | Task | Protocol/mechanism | Frameworks |
Web applications | Dynamic web content, Connect with web server, Standalone web servers |
Web server connectors: CGI, FastCGI, SCGI, AJP. HTTP server |
Netcgi (connector framework) |
Network applications (classic client/server) |
SunRPC clients, SunRPC servers |
SunRPC binary protocol, SunRPC stub generator, Portmapper/RPCBIND, RPCSEC_GSS |
|
Network applications (modern client/server) |
Call HTTP interfaces, Provide HTTP interfaces |
HTTP client, HTTP server, HTTP authentication |
|
Email applications | Create emails with attachments, Send emails, Parse emails, Interact with email server |
SMTP client, POP client, SASL authentication |
|
Network utilities | Data download and upload, Encode and decode, Character sets, Structured formats, URLs, IPv6 |
HTTP client, FTP client |
Netfs (filesystem framework) |
System utiltities | Invoke commands, Daemonize, Shared memory, Logging, Locales, Timers |
|
Netplex (multi-process daemons) |
Authentication and security | Network authentication, Integrity protection, Privacy |
TLS (via GnuTLS), SASL, GSSAPI (Kerberos), LDAP client |
Pluggable security providers for TLS, SASL, GSSAPI, Digests, Symmetric ciphers |
Ocamlnet4
: Changes in OCamlnet-4Foreword
: How Ocamlnet is organizedGet
: How to get OCamlnetPlatform
: Which functions are available on which platform
(POSIX/Win32). Also hints for portable programming.Ipv6
: The state of IPv6 supportTls
: TLS supportCrypto
: CryptographyAuthentication
: Authentication frameworksCredentials
: How to express and store credentialsGssapi
: The GSSAPI security layerRegexp
: Regular expression backendsIntro.ch_base
Intro.netstring
Intro.netunidata
Intro.netzip
Intro.equeue
Intro.netplex
Intro.netshm
Intro.netsys
Intro.ch_web
Intro.netcgi2
Intro.netcgi2_apache
Intro.netcgi2_plex
Intro.nethttpd
Intro.ch_cs
Intro.rpc
Intro.rpc_local
Intro.rpc_xti
Intro.ch_comp
Intro.netcamlbox
Intro.netmulticore
Intro.ch_netproto
Intro.netclient
Netchannels_tut
: The Netchannels
tutorial - strongly
recommended read!Netmime_tut
: The Netmime
tutorialNetsendmail_tut
: The Netsendmail
tutorialNetulex_tut
: The Netulex
tutorialNeturl_tut
: The Neturl
tutorialEqueue_howto
: The Equeue, Unixqueue, and Engines HOWTOEqueue_intro
: Introduction to programming with equeue
Netplex_intro
: Introduction to Netplex
Netplex_advanced
: Advanced features of Netplex
Netplex_admin
: Netplex administration guideNetshm_intro
: Shared Memory for IPCShell_intro
: Motivation for shell
netstring
library: string processing functionsnetstring
focuses on string processing functions, and base definitions
for other libraries.
Netaccel | Accelerators for bytecode |
Netaccel_link | Enables accelerator module |
Netaddress | Parsing of mail addresses |
Netasn1 | ASN.1 support functions |
Netasn1_encode | ASN.1 encoder |
Netauth | Some primitives for authentication |
Netaux | Internal auxiliary functions |
Netbuffer | A Netbuffer.t is a buffer that can grow and shrink dynamically. |
Netchannels | Object-oriented I/O: Basic types and classes |
Netchannels_crypto | Crypto extensions for |
Netcompression | Registry for compression algorithms |
Netconversion | Conversion between character encodings |
Netdate | Support for common date/time parsing and formatting. |
Netdn | X.500 distinguished names |
Netencoding | Base64, Quoted Printable, URL encoding, HTML escaping |
Netfs | Class type |
Netglob | Globbing |
Netgssapi_auth | Authentication helpers for GSSAPI |
Netgssapi_support | Support functions for GSS-API |
Nethtml | Parsing of HTML |
Nethttp | Basic definitions for the HTTP protocol |
Netmappings | Internal access to the character conversion database |
Netmech_crammd5_sasl | |
Netmech_digest_http | Digest authentication for HTTP |
Netmech_digest_sasl | |
Netmech_gs2_sasl | The GS2 bridge for using GSSAPI mechanisms as SASL mechanisms |
Netmech_krb5_sasl | Kerberos 5 as SASL mechanism |
Netmech_plain_sasl | |
Netmech_scram | SCRAM mechanism for authentication (RFC 5802) |
Netmech_scram_gssapi | The SCRAM security mechanism for GSS-API |
Netmech_scram_sasl | SCRAM as SASL mechanism |
Netmech_scram_http | SCRAM for HTTP (prerelease) |
Netmech_spnego_http | SPNEGO (GSSAPI) authentication for HTTP |
Netmime | Netmime contains high-level classes and functions to process mail and MIME messages. |
Netmime_channels | MIME: parsing and printing for channels |
Netmime_header | MIME: Access methods for frequent standard fields. |
Netmime_string | Low-level functions to parse and print mail and MIME messages |
Netnumber | Binary encodings of numbers |
Netoid | X.500 Object Identifiers |
Netpagebuffer | Buffer for page-aligned I/O |
Netsaslprep | The SASLprep algorithm (RFC 4013) |
Netsendmail | Functions to compose and send electronic mails |
Netsockaddr | Parsing of socket addresses |
Netstream | A netstream is an input channel that is read block by block. |
Netstring_str | Wrapper for regexps with |
Netstring_tstring | Support module for tagged strings |
Nettls_support | Support types and functions for TLS |
Netulex | Support module for Alain Frisch's |
Netunichar | Unicode character information |
Neturl | Uniform Resource Locators (URLs) |
Neturl_ldap | LDAP-specific URLs |
Netx509 | X.509 certificates |
Netx509_pubkey | X.509 public key cryptography - keys and naming |
Netx509_pubkey_crypto | X.509 public key cryptography - wrappers |
Netxdr | External Data Representation |
Netxdr_mstring | Managed Strings |
netstring-pcre
library: additions for PCRENetstring_pcre | Wrapper for regexps with PCRE syntax |
netunidata
library: Unicode tablesNetunidata | Configure how to load Unicode tables |
netzip
library: compression for object channelsSupport for (un)compressing data on the fly with object channels. Requires ocamlzip.
Netgzip | Gzip object channels |
equeue
library: concurrent execution flows via event queuesequeue
is a fundamental library for event queues. It is mainly used
by a number of other libraries of Ocamlnet to parallelize network code
(so-called multiplexing).
Equeue |
|
Unixqueue | |
Unixqueue_pollset | Unixqueue implementation on top of |
Unixqueue_select | |
Uq_engines | An engine performs a certain task in an autonomous way. |
Uq_socks5 | |
Uq_resolver | Support for pluggable resolvers |
Uq_io | Unified engines for stream I/O |
Uq_client | |
Uq_server | |
Uq_multiplex | Multiplex Controllers |
Uq_transfer | |
Uq_lwt | Compatibility with |
Uq_libevent | Use Libevent as event loop |
Uq_mt | Using engines in multi-threaded programs |
equeue-gtk1
and equeue-gtk2
extensionsExtensions for equeue
to integrate the event queue into user interfaces
made with lablgtk and lablgtk2
Uq_gtk |
equeue-tcl
extensionExtension for equeue
to integrate the event queue into user interfaces
made with labltk
Uq_tcl |
netplex
library: generic server frameworkThe netplex
library is a protocol-independent server framework.
Especially, it can be used in conjunction with nethttpd
to
build web servers, and with rpc
to build RPC servers.
Netplex_types | Types for |
Netplex_config | Read the configuration file |
Netplex_controller | Controller |
Netplex_container | Containers |
Netplex_sockserv | Socket service creation |
Netplex_workload | Workload management |
Netplex_kit | Netplex toolkit |
Netplex_cenv | Container environment |
Netplex_log | Loggers |
Netplex_main | Main program for Netplex servers |
Netplex_mp | Multi-processing provider |
Netplex_mt | Multi-threading provider |
Netplex_mutex | Netplex-wide mutexes |
Netplex_semaphore | Netplex-wide semaphores |
Netplex_sharedvar | Netplex-wide variables |
Netplex_mbox | Netplex message boxes |
Netplex_encap | Type-safe marshalling between processes of the same executable |
Netplex_internal | Internal services |
Rpc_netplex | Netplex support for RPC servers (TCP only) |
shell
library: start external commandsThe shell
library allows you to start external commands. It is integrated
into equeue
.
Shell | Calls external programs, creates pipelines, etc. |
Shell_sys | Calls external programs, creates pipelines, etc. |
Shell_uq | Run shell commands within Unixqueues |
Shell_fs | Shell filesystem |
netshm
library: manage shared memoryThe netshm
library manages a shared memory object either as hash table
or array. It is designed to be used in multi-processing program architectures.
Note that there is now also the much better Intro.netmulticore
library.
Netshm | Shared memory for O'Caml programs using multi-processing |
Netshm_data | Data representation for shared memory |
Netshm_hashtbl | Hash tables in shared memory |
Netshm_array | Arrays in shared memory |
netsys
library: system interfacesThe netsys
library contains a number of low-level functions used by
other Ocamlnet libraries.
Platform | Platform Support |
Netexn | Exception registry |
Netlog | Basic logging facility |
Netsys | System calls missing in the |
Netsys_posix | POSIX-specific system calls missing in the |
Netsys_oothr | Object-oriented thread API |
Netsys_signal | Signal handler framework |
Netsys_tmp | Temporary files |
Netsys_mem | Bigarrays as memory buffers |
Netsys_sem | Generic anonymous semaphores |
Netsys_global | Global variables |
Netsys_pollset | Sets of file descriptors for polling |
Netsys_pollset_generic | |
Netsys_pollset_posix | Pollsets for POSIX operating systems |
Netsys_pollset_win32 | Pollsets for Win32 |
Netsys_win32 | Primitives for Win32 |
Netsys_polypipe | Polymorphic message pipes |
Netsys_polysocket | Polymorphic message sockets |
Netsys_rng | Random-number generator |
Netsys_crypto_types | Types for crypto providers |
Netsys_crypto | Cryptographic providers |
Netsys_crypto_modes | Helpers for crypto modes |
Netsys_tls | User-level TLS API |
Netsys_ciphers | Symmetric cryptographic ciphers |
Netsys_digests | Cryptographic digests (hashes) |
Netsys_gssapi | GSS-API Definition |
nettls-gnutls
library: GnuTLS bindingsNettls_gnutls | GnuTLS |
Nettls_gnutls_bindings | Bindings of a C library |
Nettls_nettle_bindings | Bindings of a C library |
netgss
library: GSSAPI bindingsNetgss | This is the system-wide version of GSSAPI |
Netgss_bindings | Bindings of a C library |
Netcgi_porting
: Porting netcgi1
programs to netcgi2
Nethttpd_intro
: Overview over the HTTP daemonnetcgi1
libraryThe netcgi1
library is no longer supported in Ocamlnet 3. Please
switch to netcgi2
.
netcgi2
library: web application frameworkThis is the revised library for Web applications, now called netcgi2
.
Netcgi | Common data-structures for CGI-like connectors. |
Netcgi_common | Functions to develop new connectors. |
Netcgi_cgi | Classical CGI connector. |
Netcgi_fcgi | FastCGI connector. |
Netcgi_ajp | Apache JServ Protocol (AJP) 1.3 connector. |
Netcgi_scgi | SCGI connector. |
Netcgi_test | Connector for testing your code. |
Netcgi_dbi | Pools of connections for the ocamldbi generic database interface. |
Netcgi1_compat | Compatibility module with the previous version of Netcgi. |
netcgi2-apache
library: run web apps inside ApacheThis is an Apache connector for the netcgi2
library.
Netcgi_apache | Netcgi Apache "mod" connector. |
Netcgi_modtpl |
netcgi2-plex
library: run web apps with NetplexNetplex support for running Netcgi2 connectors:
Netcgi_plex | Netplex support for FastCGI, SCGI and AJP connectors |
nethttpd
library: standalone web appsThe nethttpd
library is a Web server component written in O'Caml.
For a full web server, you'll also need netplex
.
Nethttpd_types | Type definitions for the HTTP daemon |
Nethttpd_kernel | The protocol kernel of the HTTP daemon |
Nethttpd_reactor | The reactive encapsulation of the HTTP daemon |
Nethttpd_engine | The event-based encapsulation of the HTTP daemon |
Nethttpd_services | Service Providers for HTTP daemon |
Nethttpd_plex | Netplex support |
Nethttpd_util | Utility functions |
Rpc_intro
: IntroductionRpc_mapping_ref
: RPC Language Mapping ReferenceRpc_intro_gss
: Securing RPC with the GSS-APIrpc
library: SunRPCThis library implements OncRPC (alias SunRPC).
Rpc | Common types and exceptions |
Rpc_program | RPC programs |
Rpc_client | RPC clients |
Rpc_simple_client | Synchronous API for RPC clients |
Rpc_proxy | RPC proxies |
Rpc_server | RPC servers |
Rpc_auth_sys | Authentication module AUTH_SYS |
Rpc_portmapper | Portmapper/RPCBIND interface |
Rpc_portmapper_aux | |
Rpc_portmapper_clnt | |
Rpc_transport | Low-level RPC transporters |
Rpc_packer | Packing and Unpacking of messages; can be used by both client and server programs. |
Rpc_auth_gssapi | GSS-API for RPC authentication |
rpc-auth-local
extension: authentication for local socketsAuthentication for local socket connections.
Rpc_auth_local |
rpc-xti
extension: System V helpersSystem V provides a network API called XTI in addition to the socket API. This library allows it to connect to RPC services that can only be reached over a local XTI connection ("cots" connection).
Rpc_xti_client | Minimal support for TI-RPC over the XTI API |
Netmcore_basics
: BasicsNetmcore_tut
: TutorialImportant change since OCaml-4.01: This OCaml version changed the
semantics of the built-in primitives caml_modify
and
caml_initialize
. Essentially, it is no longer possible to modify
OCaml values residing outside the regular OCaml heap. As we do this
inside Netcamlbox and Netmulticore, this change affects these
libraries. Fortunately, there is a workaround on systems supporting weak
symbols (all ELF systems and OS X): Here, caml_modify
and
caml_initialize
are overridden by Ocamlnet so that they are
again compatible. Note that this is a global modification of the
runtime system!
netcamlbox
library: message passingCamlbox is a fast message-passing system between processes running on the same machine. It uses shared memory for communication. A message sent to a Camlbox is only copied once, not twice.
Netcamlbox | Camlboxes are a fast IPC mechanism to send Ocaml values from one process to another. |
netmulticore
library: compute jobsNetmulticore is an experimental framework for managing multiple processes, and sending messages between them.
Netmcore | Multi-processing for compute jobs |
Netmcore_process | Statically typed processes |
Netmcore_mempool | Memory pools |
Netmcore_heap | Shared heaps of structured values |
Netmcore_array | Shared arrays |
Netmcore_buffer | Shared buffer |
Netmcore_hashtbl | Shared hashtables |
Netmcore_matrix | Shared 2-dimensional arrays (matrices) |
Netmcore_queue | Shared queues |
Netmcore_ref | Shared mutable variables |
Netmcore_mutex | Mutexes |
Netmcore_sem | Semaphores |
Netmcore_condition | Condition variables |
Netmcore_camlbox | Camlboxes for use in netmulticore programs |
Netclient_tut
: The Netclient tutorial (HTTP, FTP)netclient
library: HTTP, FTP, Telnet, POP, SMTP, LDAPThis library includes clients for HTTP, Telnet, FTP, SMTP, POP, and LDAP.
Nethttp_client | HTTP 1.1 client |
Nethttp_client_conncache | Connection cache |
Nethttp_fs | HTTP filesystem |
Netftp_client | FTP client |
Netftp_data_endpoint | Senders and receivers for the FTP data connection |
Netftp_fs | FTP filesystem |
Netldap | LDAP client |
Nettelnet_client | Telnet client |
Netpop | This is an interface for the Post Office Protocol - Version 3 (POP3) as specifed by RFC 1939. |
Netsmtp | This is an interface for the Simple Mail Tranfer Protocol (SMTP) as specified by RFC 2821. |
The Ocamlnet libraries have been initially written by Gerd Stolpmann and Patrick Doane.
Contributions by
netcgi
Sponsorships by