usocket

Goal

The project wants to provide a portable TCP/IP (and later on maybe UDP) socket interface for as many Common Lisp implementations as possible, while keeping the abstraction and portability layer as thin as possible.

Because trivial-sockets has been declared dead and its author has said he will declare usocket its successor if there is a zero effort path of migration, I'm also working on trivial-usocket which is supposed to be a sub-optimal, but zero effort migration from trivial-sockets.

If your lisp isn't mentioned in the list below, please feel free to submit a request for it at the mailing list mentioned below.

Comparison to other socket libraries

Since usocket is effectively the succesor to trivial-sockets, see the feature comparison with trivial-sockets in order to find out which one you should use.

After starting the project, many others turned out to have worked on something alike, many times as part of a broader project or library. Some of them were known at the start of this project, others have been conceived after the usocket project already started. Not all of them have exactly the same portability goal.

See the Implementation comparison page for a comparison of the portability of other libaries and how that relates to usocket.

Documentation

See the documentation page for the API description.

Supported implementations

Currently these implementations are supported:

Community

This project has started Januari 2006. There isn't much of a community yet, though I'd like there to be one. So, you're invited to join the mailing list, announce yourself and even join the effort!

Development discussion takes place on usocket-devel@common-lisp.net.

Project tracking happens in the project's Trac setup. Please take note of the guidelines before entering a bug or enhancement request into the database.

Development

Development will at least follow the steps outlined below. Yet to be determined is whether the currently mentioned steps will be enough to release version 1.0. Possibly, UDP sockets remain to be addressed before doing 1.0; that will depend on your reactions :-)

The targeted implementations listed in the status table below are not a final list: others can be added if/when the need or interest arrises.

Active development is taking place in the Subversion repository. To be kept up to date, please subscribe to the commit message mailing list. To use the latest development version, make sure you have Subversion installed and execute this command:

 $ svn checkout svn://common-lisp.net/project/usocket/svn/usocket/trunk usocket-svn
  

Please send patches, bug reports and suggestions to the development mailing list address given above. The table below indicates the current state of development.

Status for the currently targeted backends
Major steps Socket implementations
Minor steps SBCL CMUCL ABCL clisp Allegro LispWorks OpenMCL ECL Scieneer
Minimal active sockets support at the same level as provided by trivial-sockets.
(Meaning streamed tcp traffic on connected sockets.)
Investigate interfaces provided. DONE DONE DONE DONE DONE DONE DONE DONE DONE
Identify socket errors generated. DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement active socket support. DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement remapping of implementation defined errors. DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implementation test-suite status PASS PASS PASS PASS PASS PASS PASS PASS PASS
Add functions to retrieve socket properties:
Local and remote IP address and port.
Investigate interfaces provided DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement it. DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implementation test-suite status PASS PASS PASS PASS PASS PASS PASS PASS PASS
Add support for passive (connection-accepting/server) sockets. Investigate interfaces provided WIP WIP WIP WIP WIP WIP WIP WIP WIP
Implement api calls listen and accept DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement api calls get- and setsockopt (or equivalent). TODO TODO TODO TODO TODO TODO TODO TODO TODO
Implement efficient waiting for multiple sockets in one function call (select() like behaviour). Investigate interfaces provided DONE DONE DONE DONE DONE done DONE DONE DONE
Implement wait-for-input api. DONE DONE DONE DONE DONE done DONE DONE DONE
Implement more uncommon api calls for tcp streams. send, recv TODO TODO TODO TODO TODO TODO TODO TODO TODO
shutdown TODO TODO TODO TODO TODO TODO TODO TODO TODO
Implement udp socket support. Investigate API's provided WIP WIP WIP WIP WIP WIP WIP WIP WIP
Build on top of that (or custom ffi). TODO TODO TODO TODO TODO TODO TODO TODO TODO

Interface guarantees

The interfaces currently published in the :export part of the package definition are guaranteed to stay compatible for the entire 0.x lifecycle. Extention in a backward compatible way is ofcourse valid, as is the addition of new interface functions.

Releases

Current release

Releases are uploaded to the releases/ directory. You can find short descriptions in the table below:

Release history
DateReleaseSummary
Jun 28, 2008 0.3.7 Fix of OpenMCL (Closure CL) backend.
Jun 21, 2008 0.3.6 Code fixups based on advice from the ECL and OpenMCL maintainers. New exported symbols: WITH-MAPPED-CONDITIONS, NS-CONDITION, NS-ERROR, NS-UNKNOWN-ERROR and NS-UNKNOWN-CONDITION.
Jul 25, 2007 0.3.4 Fix clisp get-host-name, multiple ECL fixes.
Jun 05, 2007 0.3.3 Fix where host resolution routine was unable to resolve would return NIL instead of erroring.
Mar 04, 2007 0.3.2 Fixes for many backends related to closing sockets. LispWorks fix for broken server sockets. API guarantee adjustments in preparation of porting Drakma.
Feb 28, 2007 0.3.1 fixed with-server-socket; prevent creation of invalid sockets; 2 more convenience macros.
Feb 26, 2007 re-release Re-release of 0.2.3, 0.2.4, 0.2.5 and 0.3.0 tarballs because the originals included Subversion administration areas.
Jan 21, 2007 0.3.0Server sockets
Jan 19, 2007 0.2.5Allegro compilation fix.
Jan 17, 2007 0.2.4Various fixes for CMUCL, OpenMCL, Allegro and LispWorks.
Jan 04, 2007 0.2.3Add :element-type support to support stacking flexi-streams on socket streams for portable :external-format support.
Jan 03, 2007 0.2.2Add ECL support and a small SBCL bugfix.
Dec 21, 2006 0.2.1Remove 'open-stream' interface which is supposed to be provided by the 'trivial-usocket' package.
Dec 18, 2006 0.2.0Add support for Scieneer Common Lisp, fix issue #6 and API preparation for server side sockets (not in this release)
Feb 13, 2006 0.1.0Initial release

Project history

Long ago the project was conceived and started by Erik Enge in an attempt to factor out all implementation specific sockets code from cl-irc. This 'long ago' must have been way before 2003 when I entered the cl-irc project.

In january 2006, Erik Huelsmann found Erik Enge willing to donate the code he had still laying around to restart the project. The restart took place at the 27th of january when the old code was imported into the public repository.


Back to Common-lisp.net.
Valid XHTML 1.0 Strict