From ehuelsmann at common-lisp.net Mon May 7 17:50:49 2007 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Mon, 7 May 2007 13:50:49 -0400 (EDT) Subject: [usocket-cvs] r229 - public_html Message-ID: <20070507175049.2283C13025@common-lisp.net> Author: ehuelsmann Date: Mon May 7 13:50:47 2007 New Revision: 229 Added: public_html/api-docs.shtml (contents, props changed) Log: Add public API documentation (WIP). Added: public_html/api-docs.shtml ============================================================================== --- (empty file) +++ public_html/api-docs.shtml Mon May 7 13:50:47 2007 @@ -0,0 +1,144 @@ + + + + + usocket API documentation + + + + + +

usocket API documentation

+ +

$Id$
+ Work in progress.

+ +

Please note that we're committed to the interface described +below for the entire 0.x phase of the library. When 1.0 comes +some of the functionality may be split up in different functions +and guarantees may change because of it.

+ + +

Conventions

+ + +
+
Specification of a host parameter
+
A host parameter may be any one of + +
+
+ +

Functions for socket creation and manipulation

+ +
+
socket-connect host port &key element-type => socket
+ +
+

Creates a tcp (stream) socket to the host and port specified. The return value is +a socket object of class stream-usocket.

+ +

The element-type argument is used in the +construction of the associated stream.

+ +
+socket-listen host port &key reuse-address backlog element-type => socket
+

Creates and returns a passive ("server") socket associated with host and port. + The object returned is of subtype stream-server-usocket.

+

host names a local interface.
+ port names a local port, or 0 (zero) to request a random free port.
+ reuse-address is a boolean (t, nil) value signalling reuse of the address is requested (or not).
+ backlog is the length of the queue containing connections which haven't actually been accepted yet.
+ element-type is the default element type used for sockets created by socket-accept. character is + the default when it's not explicitly provided. +

+ + +
socket-accept socket &key element-type => new-socket
+

Creates and returns an active ("connected") stream socket new-socket from the + socket passed. The return value is a socket object of class + stream-usocket.

+

element-type is the element type used to construct the associated stream. If it's not specified, + the element-type of socket (as used when it was created by the call to socket-listen) is + used. +

+
+ +
socket-close socket
+

Flushes the stream associated with the socket and closes the socket connection.

+ + + + +
+ +

Classes

+ +
+
usocket
+
Slots: +
+
socket :accessor socket +

Used to store sockets as used by the current implementation - may be any of socket handles, socket objects and stream objects

+
+ +
stream-usocket
+
Parent classes: usocket
+ Slots: +
+
stream :accessor socket-stream +

Used to store the stream associated with the tcp socket connection.
+ When you want to write to the socket stream, use this function.

+
+ +
stream-server-usocket
+
Parent classes: usocket
+ Slots: +
+
element-type :reader element-type +

Indicates the default element-type to be used when constructing streams off this socket when + no element type is specified in the call to socket-accept.

+
+
+ +

Variables / constants

+ +
+
*wildcard-host*
+

The host to use with socket-listen to make the socket listen on all available interfaces.

+
*auto-port*
+

The port number to use with socket-listen to make the socket listen on a random available port. The port number assigned can be + retrieved from the returned socket by calling get-local-port.

+
+ +
+Back to Common-lisp.net. +
+
+ Valid XHTML 1.0 Strict +
+ + + From ehuelsmann at common-lisp.net Tue May 8 20:17:50 2007 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Tue, 8 May 2007 16:17:50 -0400 (EDT) Subject: [usocket-cvs] r230 - public_html Message-ID: <20070508201750.15E134E008@common-lisp.net> Author: ehuelsmann Date: Tue May 8 16:17:49 2007 New Revision: 230 Modified: public_html/implementation-comparison.shtml Log: Add IOLib to the list. Modified: public_html/implementation-comparison.shtml ============================================================================== --- public_html/implementation-comparison.shtml (original) +++ public_html/implementation-comparison.shtml Tue May 8 16:17:49 2007 @@ -23,30 +23,30 @@ Supported implementations comparison Implementationtrivial-socketsACL-COMPAT - s-sysdepsusocketkmrcl + s-sysdepsusocketkmrclIOLib -SBCLyesyesyesyesyes +SBCLyesyesyesyesyesyes -CMUCLyesyesyesyesyes +CMUCLyesyesyesyesyesyes -ArmedBearyesnonoyesno +ArmedBearyesnonoyesnono -clispyesyesnoyesyes +clispyesyesnoyesyesyes -Allegroyesnot relevantnoyesyes +Allegroyesnot relevantnoyesyesno -LispWorksyesyesyesyesyes +LispWorksyesyesyesyesyesno -OpenMCLyesyesyesyesyes +OpenMCLyesyesyesyesyesno -ECLnononoyesno +ECLnononoyesnono -Scieneernoyesnoyesno +Scieneernoyesnoyesnono -GCLnononono (to come)no +GCLnononono (to come)nono -Cormannoyesnono (to come)no +Cormannoyesnono (to come)nono From ehuelsmann at common-lisp.net Tue May 8 20:20:58 2007 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Tue, 8 May 2007 16:20:58 -0400 (EDT) Subject: [usocket-cvs] r231 - usocket/trunk Message-ID: <20070508202058.738355202B@common-lisp.net> Author: ehuelsmann Date: Tue May 8 16:20:57 2007 New Revision: 231 Modified: usocket/trunk/usocket.lisp Log: Update docstring for the 'new' :element-type key parameter. Modified: usocket/trunk/usocket.lisp ============================================================================== --- usocket/trunk/usocket.lisp (original) +++ usocket/trunk/usocket.lisp Tue May 8 16:20:57 2007 @@ -279,7 +279,7 @@ ;; Documentation for the function ;; -;; (defun SOCKET-CONNECT (host port) ..) +;; (defun SOCKET-CONNECT (host port &key element-type) ..) ;; (setf (documentation 'socket-connect 'function) @@ -287,6 +287,9 @@ an IP address represented in vector notation, such as #(192 168 1 1). `port' is assumed to be an integer. +`element-type' specifies the element type to use when constructing the +stream associated with the socket. The default is 'character. + Returns a usocket object.") ;; Documentation for the function From ehuelsmann at common-lisp.net Tue May 8 20:24:29 2007 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Tue, 8 May 2007 16:24:29 -0400 (EDT) Subject: [usocket-cvs] r232 - usocket/trunk Message-ID: <20070508202429.11FAA5202B@common-lisp.net> Author: ehuelsmann Date: Tue May 8 16:24:28 2007 New Revision: 232 Modified: usocket/trunk/README Log: Add remarks on licensing. Modified: usocket/trunk/README ============================================================================== --- usocket/trunk/README (original) +++ usocket/trunk/README Tue May 8 16:24:28 2007 @@ -6,6 +6,7 @@ ======= * Introduction + * Remarks on licensing * Non-support for :external-format * API definition * Test suite @@ -21,7 +22,7 @@ - SBCL - CMUCL - - ArmedBear (post feb 11th, 2006 versions) + - ArmedBear (post feb 11th, 2006 CVS or 0.0.10 and higher) - clisp - Allegro Common Lisp - LispWorks @@ -40,6 +41,16 @@ tricks to use the checkout directly.) +Remarks on licensing +==================== + +Even though the source code has an MIT style license attached to it, +when compiling this code with some of the supported lisp implementations +you may not end up with an MIT style binary version due to the licensing +of the implementations themselves. ECL is such an example and - when +it will become supported - GCL is like that too. + + Non-support of :external-format =============================== From ehuelsmann at common-lisp.net Tue May 8 21:53:59 2007 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Tue, 8 May 2007 17:53:59 -0400 (EDT) Subject: [usocket-cvs] r233 - public_html Message-ID: <20070508215359.6CD4174387@common-lisp.net> Author: ehuelsmann Date: Tue May 8 17:53:57 2007 New Revision: 233 Modified: public_html/index.shtml Log: Update project homepage with latest project status. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Tue May 8 17:53:57 2007 @@ -32,6 +32,10 @@

See the feature comparison with trivial-sockets in order to find out which one you should use.

+

Documentation

+ +

See the documentation page for the API description.

+

Supported implementations

Currently these implementations are supported:

@@ -39,10 +43,10 @@