USOCKET

Goal

The project wants to provide a portable TCP/IP and UDP/IP 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 CCL ECL Scieneer MCL
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 DONE
Identify socket errors generated. DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement active socket support. DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement remapping of implementation defined errors. DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implementation test-suite status PASS 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 DONE
Implement it. DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implementation test-suite status PASS PASS PASS PASS PASS PASS PASS PASS PASS PASS
Add support for passive (connection-accepting/server) sockets. Investigate interfaces provided DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement api calls listen and accept DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
Implement api calls get- and setsockopt (or equivalent). DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
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 DONE
Implement wait-for-input api. DONE 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 TODO
shutdown WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP
Implement udp socket support. Investigate API's provided DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE
Build on top of that (or custom ffi). DONE DONE DONE DONE DONE DONE DONE DONE DONE DONE

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
Date Release Summary
Jun 21, 2013
0.6.1
Initial MOCL support; initial MCL UDP support; improved SOCKET-OPTION; bugfix for CCL backend.
Dec 26, 2012
0.6.0
New API: SOCKET-OPTION; Add support for ECL DFFI mode; bugfix for LispWorks, CLISP, ABCL, ECL.
Feb 27, 2012
0.5.5
LispWorks 6.1 compatibility; SOCKET-CONNECT argument :nodelay can now set to :if-supported
Oct 1, 2011
0.5.4
Minor fixes for ECL, Allegro CL modern mode, and SBCL.
Aug 13, 2011
0.5.3
Fixed "SBCL data flush problem"; Important fixes for MCL and LispWorks (delivery mode).
May 11, 2011
0.5.2
Fixed WAIT-FOR-INPUT for CLISP which made Hunchentoot working; Lots of bugfix for SBCL, ECL, ABCL and LispWorks.
Apr 2, 2011
0.5.1
Improved CLISP support using FFI; Lots of bugfix for CMUCL, SBCL, LispWorks, etc.
Mar 12, 2011 0.5.0 UDP support; Lots of bugfixes since 0.4.1; support for WAIT-FOR-INPUT for SBCL and ECL on Win32; new platform added: Macintosh Common Lisp (5.0 and up)
Dec 27, 2008 0.4.1 fixes for ECL, LispWorks, SBCL, SCL
Oct 28, 2008 0.4.0 select()-like api: make a single thread wait for multiple sockets.
various socket options for socket-creation with SOCKET-CONNECT.
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.0 Server sockets
Jan 19, 2007 0.2.5 Allegro compilation fix.
Jan 17, 2007 0.2.4 Various fixes for CMUCL, OpenMCL, Allegro and LispWorks.
Jan 04, 2007 0.2.3 Add :element-type support to support stacking flexi-streams on socket streams for portable :external-format support.
Jan 03, 2007 0.2.2 Add ECL support and a small SBCL bugfix.
Dec 21, 2006 0.2.1 Remove 'open-stream' interface which is supposed to be provided by the 'trivial-usocket' package.
Dec 18, 2006 0.2.0 Add support for Scieneer Common Lisp, fix issue #6 and API preparation for server side sockets (not in this release)
Feb 13, 2006 0.1.0 Initial 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.

Starting from 2008, Chun Tian (binghe) joined into usocket development team with his UDP code base.

With 0.6.0 release, this project, where it started as an intersection of the functionalities available on different platforms, now slowly moving to the union of all functionalities available on all different implementations.


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