diff -ur -x .svn usocket-svn/README usocket-accept/README
--- usocket-svn/README	2006-10-07 20:49:57.000000000 -0400
+++ usocket-accept/README	2006-10-08 13:33:11.000000000 -0400
@@ -43,6 +43,24 @@
     socket-stream socket
       the return value of which satisfies the normal stream interface
 
+ - usocket-server (class)
+ - server-listen (function) [ to create a passive/server socket ]
+    server-listen port &optional (host *default-host*)
+                                 (backlog *default-backlog-size*)
+      where `host' is a vectorized ip
+                      or a string representation of a dotted ip address
+		      or a hostname for lookup in the DNS system
+      `host' and `backlog' are ignored on systems that do not support
+      specifying them
+ - server-accept (method)
+     server-accept server-socket
+       returns a newly connected usocket
+ - server-close (method)
+     server-close server-socket
+ - *default-host* (variable)
+     the default host to bind server sockets to. 0.0.0.0 by default.
+ - *default-backlog-size* (variable)
+      the default connection backlog size. 16 by default.
 
 Errors:
  - address-in-use-error
diff -ur -x .svn usocket-svn/backend/sbcl.lisp usocket-accept/backend/sbcl.lisp
--- usocket-svn/backend/sbcl.lisp	2006-10-07 20:49:57.000000000 -0400
+++ usocket-accept/backend/sbcl.lisp	2006-10-08 14:33:40.000000000 -0400
@@ -58,15 +58,25 @@
                    (signal 'unkown-condition
                            :real-condition condition))))))
 
+(defun sb-make-socket (socket)
+  "Makes a USOCKET from an SB-BSD-SOCKETS:SOCKET."
+  (let ((stream (sb-bsd-sockets:socket-make-stream socket
+						   :input t
+						   :output t
+						   :buffering :full
+						   :element-type 'character)))
+    ;;###FIXME: The above line probably needs an :external-format
+    (make-instance 'usocket :stream stream :socket socket)))
+
+(defun make-sb-socket-stream (socket)
+  "Makes a stream from an SB-BSD-SOCKETS:SOCKET."
+  (sb-bsd-sockets:socket-make-stream socket :input t :output t
+				     :buffering :full :element-type 'character))
 
 (defun socket-connect (host port)
   (let* ((socket (make-instance 'sb-bsd-sockets:inet-socket
                                 :type :stream :protocol :tcp))
-         (stream (sb-bsd-sockets:socket-make-stream socket
-                                                    :input t
-                                                    :output t
-                                                    :buffering :full
-                                                    :element-type 'character))
+         (stream (make-sb-socket-stream socket))
          ;;###FIXME: The above line probably needs an :external-format
          (usocket (make-instance 'usocket :stream stream :socket socket))
          (ip (host-to-vector-quad host)))
@@ -96,6 +106,33 @@
 (defmethod get-peer-port ((usocket usocket))
   (nth-value 1 (get-peer-name usocket)))
 
+(defun server-listen (port &optional (host *DEFAULT-HOST*)
+		      (backlog *DEFAULT-BACKLOG-SIZE*))
+  (let ((socket (make-instance 'sb-bsd-sockets:inet-socket
+			       :type :stream :protocol :tcp)))
+    (sb-bsd-sockets:socket-bind socket host port)
+    (sb-bsd-sockets:socket-listen socket backlog)
+    (make-instance 'usocket :socket socket
+		   :stream (make-sb-socket-stream socket))))
+
+(defmethod server-accept ((server-socket usocket-server))
+  (sb-make-socket
+   (with-mapped-conditions (server-socket)
+     (sb-bsd-sockets:socket-accept (server-socket server-socket)))))
+
+(defmethod server-close ((server-socket usocket-server))
+  (with-mapped-conditions (server-socket)
+    (sb-bsd-sockets:socket-close (server-socket server-socket)))
+  (setf (server-socket server-socket) nil))
+
+(defmethod get-server-name ((server-socket usocket-server))
+  (sb-bsd-sockets:socket-name (server-socket server-socket)))
+
+(defmethod get-server-address ((server-socket usocket-server))
+  (nth-value 0 (get-server-name server-socket)))
+
+(defmethod get-server-port ((server-socket usocket-server))
+  (nth-value 1 (get-server-name server-socket)))
 
 (defun get-host-by-address (address)
   (with-mapped-conditions ()
Only in usocket-accept/backend: sbcl.lisp~
diff -ur -x .svn usocket-svn/doc/backends.txt usocket-accept/doc/backends.txt
--- usocket-svn/doc/backends.txt	2006-10-07 20:49:57.000000000 -0400
+++ usocket-accept/doc/backends.txt	2006-10-08 02:54:41.000000000 -0400
@@ -13,7 +13,7 @@
  - socket-connect
  - get-hosts-by-name [ optional ]
  - get-host-by-address [ optional ]
-
+ - server-listen
 
 Methods:
 
@@ -27,6 +27,9 @@
  - get-local-port
  - get-peer-address
  - get-peer-port
+ - get-server-address
+ - get-server-port
+ - get-server-name
 
 
 An error-handling function, resolving implementation specific errors
diff -ur -x .svn usocket-svn/package.lisp usocket-accept/package.lisp
--- usocket-svn/package.lisp	2006-10-07 20:49:57.000000000 -0400
+++ usocket-accept/package.lisp	2006-10-08 13:52:04.000000000 -0400
@@ -10,7 +10,10 @@
 (eval-when (:execute :load-toplevel :compile-toplevel)
   (defpackage :usocket
       (:use :cl)
-    (:export #:socket-connect ; socket constructors and methods
+    (:export #:*default-backlog-size* ; special variables
+	     #:*default-host*
+
+	     #:socket-connect ; socket constructors and methods
              #:socket-close
              #:get-local-address
              #:get-peer-address
@@ -19,12 +22,23 @@
              #:get-local-name
              #:get-peer-name
 
+	     #:server-listen ; server socket constructors and methods
+	     #:server-accept
+	     #:server-close
+	     #:get-server-address
+	     #:get-server-port
+	     #:get-server-name
+
              #:with-connected-socket ; macros
+	     #:with-server-socket
 
              #:usocket ; socket object and accessors
              #:socket
              #:socket-stream
 
+	     #:usocket-server ; server socket object object and accessors
+	     #:server-socket
+
              #:host-byte-order ; IPv4 utility functions
              #:hbo-to-dotted-quad
              #:hbo-to-vector-quad
@@ -35,4 +49,3 @@
              #:socket-error ; errors
              #:unknown-condition
              #:unknown-error)))
-
Only in usocket-accept/test: test-usocket.lisp~
diff -ur -x .svn usocket-svn/usocket.lisp usocket-accept/usocket.lisp
--- usocket-svn/usocket.lisp	2006-10-07 20:49:57.000000000 -0400
+++ usocket-accept/usocket.lisp	2006-10-08 02:50:08.000000000 -0400
@@ -5,8 +5,6 @@
 
 (in-package :usocket)
 
-
-
 (defclass usocket ()
   ((socket
     :initarg :socket
@@ -17,6 +15,18 @@
     :accessor socket-stream
     :documentation "Implementation specific socket stream instance.")))
 
+(defclass usocket-server ()
+  ((socket
+    :initarg :socket
+    :accessor server-socket
+    :documentation "Implementation specific socket object instance.")))
+
+(defvar *DEFAULT-BACKLOG-SIZE* 8
+  "The default connection backlog size.")
+
+(defvar *DEFAULT-HOST* #(0 0 0 0)
+  "The default IP address for server sockets to bind to.")
+
 (defun make-socket (&key socket stream)
   "Create a usocket socket type from implementation specific socket
 and stream objects."
@@ -24,6 +34,11 @@
                  :socket socket
                  :stream stream))
 
+(defun make-server-socket (socket)
+  "Create a usocket-server socket type from an implementation-specific socket
+object."
+  (make-instance 'usocket-server :socket socket))
+
 (defun open-stream (peer-host peer-port
                               &key (local-host :any)
                               (local-port 0)
@@ -68,16 +83,37 @@
    "Returns the IP address and port of the peer
 the socket is connected to as values."))
 
+(defgeneric server-accept (server-socket)
+  (:documentation "Blocks until a client connects to the given server
+socket; returns a newly created socket connected to the client."))
+
+(defgeneric server-close (server-socket)
+  (:documentation "Closes a server socket."))
+
+(defgeneric get-server-address (server-socket)
+  (:documentation "Returns the local IP address of the server socket."))
+
+(defgeneric get-server-port (server-socket)
+  (:documentation "Returns the port that the given server socket is
+listening on."))
+
+(defgeneric get-server-name (server-socket)
+  (:documentation "Returns the IP address and port that the server
+socket is connected to as multiple values."))
+
 (defmacro with-connected-socket ((var socket) &body body)
   "Bind `socket' to `var', ensuring socket destruction on exit.
-
-The `body' is an implied progn form."
+The `body' is an implicit progn form."
   `(let ((,var ,socket))
-     (unwind-protect
-         (progn
-           ,@body)
-       (when ,var
-         (socket-close ,var)))))
+     (unwind-protect (progn ,@body)
+       (when ,var (socket-close ,var)))))
+
+(defmacro with-server-socket ((var server-socket) &body body)
+  "Binds `server-socket' to `var' within the scope of `body', ensuring
+that it is closed on exit."
+  `(let ((,var ,server-socket))
+    (unwind-protect (progn ,@body)
+      (when ,var (server-close ,var)))))
 
 ;;
 ;; IPv4 utility functions
@@ -183,6 +219,7 @@
 ;; Documentation for the function
 ;;
 ;; (defun SOCKET-CONNECT (host port) ..)
+;; (defun SERVER-LISTEN (port &optional host backlog)
 ;;
 
 (setf (documentation 'socket-connect 'function)
@@ -192,3 +229,6 @@
 
 Returns a usocket object.")
 
+(setf (documentation 'server-listen 'function)
+      "Returns a server socket listening on the given port and bound
+to the given address. Also allows a backlog to be specified.")
