From ehuelsmann at common-lisp.net Fri Jan 27 23:05:45 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Fri, 27 Jan 2006 17:05:45 -0600 (CST) Subject: [usocket-cvs] r1 - public_html usocket usocket/branches usocket/tags usocket/trunk usocket/trunk/backend usocket/trunk/doc usocket/trunk/test Message-ID: <20060127230545.770082A018@common-lisp.net> Author: ehuelsmann Date: Fri Jan 27 17:05:41 2006 New Revision: 1 Added: public_html/ public_html/index.shtml public_html/project-name public_html/style.css usocket/ usocket/branches/ usocket/tags/ usocket/trunk/ (props changed) usocket/trunk/LICENSE usocket/trunk/Makefile usocket/trunk/README usocket/trunk/backend/ (props changed) usocket/trunk/backend/allegro.lisp usocket/trunk/backend/clisp.lisp usocket/trunk/backend/cmucl.lisp usocket/trunk/backend/lispworks.lisp usocket/trunk/backend/sbcl.lisp usocket/trunk/condition.lisp usocket/trunk/doc/ usocket/trunk/doc/allegro-socket.txt usocket/trunk/doc/clisp-sockets.txt usocket/trunk/doc/cmucl-sockets.txt usocket/trunk/doc/errors.txt usocket/trunk/doc/lw-sockets.txt usocket/trunk/doc/openmcl-sockets.txt usocket/trunk/doc/sb-bsd-sockets.txt usocket/trunk/doc/usock-sockets.txt usocket/trunk/package.lisp usocket/trunk/test/ (props changed) usocket/trunk/test/package.lisp usocket/trunk/test/test-usocket.lisp usocket/trunk/test/usocket-test.asd usocket/trunk/usocket.asd usocket/trunk/usocket.lisp Log: Initial import as copied off Erik Enge's home dir. Added: public_html/index.shtml ============================================================================== --- (empty file) +++ public_html/index.shtml Fri Jan 27 17:05:41 2006 @@ -0,0 +1,25 @@ + + + +
+This is an automatically generated placeholder page: this project + has not yet created a website.
+ +Back to Common-lisp.net.
+ + + + Added: public_html/project-name ============================================================================== --- (empty file) +++ public_html/project-name Fri Jan 27 17:05:41 2006 @@ -0,0 +1 @@ +usocket Added: public_html/style.css ============================================================================== --- (empty file) +++ public_html/style.css Fri Jan 27 17:05:41 2006 @@ -0,0 +1,54 @@ + +.header { + font-size: medium; + background-color:#336699; + color:#ffffff; + border-style:solid; + border-width: 5px; + border-color:#002244; + padding: 1mm 1mm 1mm 5mm; +} + +.footer { + font-size: small; + font-style: italic; + text-align: right; + background-color:#336699; + color:#ffffff; + border-style:solid; + border-width: 2px; + border-color:#002244; + padding: 1mm 1mm 1mm 1mm; +} + +.footer a:link { + font-weight:bold; + color:#ffffff; + text-decoration:underline; +} + +.footer a:visited { + font-weight:bold; + color:#ffffff; + text-decoration:underline; +} + +.footer a:hover { + font-weight:bold; + color:#002244; + text-decoration:underline; } + +.check {font-size: x-small; + text-align:right;} + +.check a:link { font-weight:bold; + color:#a0a0ff; + text-decoration:underline; } + +.check a:visited { font-weight:bold; + color:#a0a0ff; + text-decoration:underline; } + +.check a:hover { font-weight:bold; + color:#000000; + text-decoration:underline; } Added: usocket/trunk/LICENSE ============================================================================== --- (empty file) +++ usocket/trunk/LICENSE Fri Jan 27 17:05:41 2006 @@ -0,0 +1,23 @@ +(This is the MIT / X Consortium license as taken from + http://www.opensource.org/licenses/mit-license.html) + +Copyright (c) 2003 Erik Enge + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Added: usocket/trunk/Makefile ============================================================================== --- (empty file) +++ usocket/trunk/Makefile Fri Jan 27 17:05:41 2006 @@ -0,0 +1,9 @@ +# $Id$ +# $Source$ + +clean: + find -name -o -name "*~" -o -name "*.err" -o -name "*.x86f" -o -name "*.lib" -o -name "*.fas" -o -name "*.fasl" -o -name "*.faslmt" -o -name "*.ufsl" | xargs rm + +commit: + make clean; cvs up; cvs ci + Added: usocket/trunk/README ============================================================================== --- (empty file) +++ usocket/trunk/README Fri Jan 27 17:05:41 2006 @@ -0,0 +1,17 @@ + +;; the backends must implement +;; +;; - handle-condition +;; - open +;; - close +;; - listen +;; - accept +;; - read-line +;; - write-sequence +;; - get-host-by-address +;; - get-host-by-name +;; +;; the backend must wrap all calls to its socket functions in a +;; handler-case/bind to make sure handle-condition is called. + +;; open should take either the hostname or an vectorized ip \ No newline at end of file Added: usocket/trunk/backend/allegro.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/allegro.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,34 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (declare (ignore type)) + (make-socket :socket (sock:make-socket :remote-host host + :remote-port port))) + +(defmethod close ((socket socket)) + "Close socket." + (sock:close (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-socket socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-socket socket))) + +(defun get-host-by-address (address) + (sock:lookup-host address)) + +(defun get-host-by-name (name) + (sock:lookup-host name)) Added: usocket/trunk/backend/clisp.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/clisp.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,40 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (declare (ignore type)) + (make-socket :socket (socket:socket-connect port host) + :host host + :port port)) + +(defmethod close ((socket socket)) + "Close socket." + (socket:socket-server-close (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-socket socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-socket socket))) + +(defun get-host-by-address (address) + (handler-case (posix:hostent-name + (posix:resolve-host-ipaddr (vector-quad-to-dotted-quad address))) + (condition (condition) (handle-condition condition)))) + +(defun get-host-by-name (name) + (handler-case (mapcar #'dotted-quad-to-vector-quad + (posix:hostent-addr-list (posix:resolve-host-ipaddr name))) + (condition (condition) (handle-condition condition)))) + Added: usocket/trunk/backend/cmucl.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/cmucl.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,41 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (let* ((socket (ext:connect-to-inet-socket (host-byte-order host) port type)) + (stream (sys:make-fd-stream socket :input t :output t :element-type 'character)) + (usocket (make-socket :socket socket :host host :port port :stream stream))) + usocket)) + +(defmethod close ((socket socket)) + "Close socket." + (ext:close-socket (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-stream socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-stream socket))) + +(defun get-host-by-address (address) + (handler-case (ext:host-entry-name + (ext::lookup-host-entry (host-byte-order address))) + (condition (condition) (handle-condition condition)))) + +(defun get-host-by-name (name) + (handler-case (mapcar #'hbo-to-vector-quad + (ext:host-entry-addr-list + (ext:lookup-host-entry name))) + (condition (condition) (handle-condition condition)))) + Added: usocket/trunk/backend/lispworks.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/lispworks.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,37 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (declare (ignore type)) + (make-socket :socket (comm:open-tcp-stream host port) + :host host + :port port)) + +(defmethod close ((socket socket)) + "Close socket." + (cl:close (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-socket socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-socket socket))) + +(defun get-host-by-address (address) + (comm:get-host-entry (vector-quad-to-dotted-quad address) + :fields '(:name))) + +(defun get-host-by-name (name) + (mapcar #'hbo-to-vector-quad + (comm:get-host-entry name :fields '(:addresses)))) Added: usocket/trunk/backend/sbcl.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/sbcl.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,48 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + "Connect to `host' on `port'. `host' is assumed to be a string of +an IP address represented in vector notation, such as #(192 168 1 1). +`port' is assumed to be an integer. + +Returns a socket object." + (let* ((socket (make-instance 'sb-bsd-sockets:inet-socket :type type :protocol :tcp)) + (stream (sb-bsd-sockets:socket-make-stream socket)) + (usocket (make-socket :socket socket :host host :port port :stream stream))) + (handler-case (sb-bsd-sockets:socket-connect socket host port) + (condition (condition) (handle-condition condition usocket))) + usocket)) + +(defmethod close ((socket socket)) + "Close socket." + (handler-case (sb-bsd-sockets:socket-close (real-socket socket)) + (condition (condition) (handle-condition condition socket)))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-stream socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-stream socket))) + +(defun get-host-by-address (address) + (handler-case (sb-bsd-sockets::host-ent-name + (sb-bsd-sockets:get-host-by-address address)) + (condition (condition) (handle-condition condition)))) + +(defun get-host-by-name (name) + (handler-case (sb-bsd-sockets::host-ent-addresses + (sb-bsd-sockets:get-host-by-name name)) + (condition (condition) (handle-condition condition)))) + Added: usocket/trunk/condition.lisp ============================================================================== --- (empty file) +++ usocket/trunk/condition.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,18 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(define-condition usocket-error (error) + ((real-condition + :reader real-condition + :initarg :real-condition) + (socket + :reader socket + :initarg :socket)) + (:report (lambda (c stream) + (format stream "Error (~A) occured in socket: ~A." + (real-condition c) (socket c))))) + Added: usocket/trunk/doc/allegro-socket.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/allegro-socket.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,46 @@ + + +(require :sock) + +accept-connection (sock passive-socket) &key wait Generic function. +dotted-to-ipaddr dotted &key errorp Function. +ipaddr-to-dotted ipaddr &key values Function. +ipaddr-to-hostname ipaddr Function. +lookup-hostname hostname +lookup-port portname protocol Function. +make-socket &key type format address-family connect &allow-other-keys Function. +with-pending-connect &body body Macro. +receive-from (sock datagram-socket) size &key buffer extract Generic function. +send-to sock &key +shutdown sock &key direction +socket-control stream &key output-chunking output-chunking-eof input-chunking +socket-os-fd sock Generic function. + +remote-host socket Generic function. +local-host socket Generic function. +local-port socket + +remote-filename socket +local-filename socket +remote-port socket +socket-address-family socket +socket-connect socket +socket-format socket +socket-type socket + +errors + +:address-in-use Local socket address already in use +:address-not-available Local socket address not available +:network-down Network is down +:network-reset Network has been reset +:connection-aborted Connection aborted +:connection-reset Connection reset by peer +:no-buffer-space No buffer space +:shutdown Connection shut down +:connection-timed-out Connection timed out +:connection-refused Connection refused +:host-down Host is down +:host-unreachable Host is unreachable +:unknown Unknown error + Added: usocket/trunk/doc/clisp-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/clisp-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,16 @@ +http://clisp.cons.org/impnotes.html#socket + +(SOCKET:SOCKET-SERVER &OPTIONAL [port-or-socket]) +(SOCKET:SOCKET-SERVER-HOST socket-server) +(SOCKET:SOCKET-SERVER-PORT socket-server) +(SOCKET:SOCKET-WAIT socket-server &OPTIONAL [seconds [microseconds]]) +(SOCKET:SOCKET-ACCEPT socket-server &KEY :ELEMENT-TYPE :EXTERNAL-FORMAT :BUFFERED :TIMEOUT) +(SOCKET:SOCKET-CONNECT port &OPTIONAL [host] &KEY :ELEMENT-TYPE :EXTERNAL-FORMAT :BUFFERED :TIMEOUT) +(SOCKET:SOCKET-STATUS socket-stream-or-list &OPTIONAL [seconds [microseconds]]) +(SOCKET:SOCKET-STREAM-HOST socket-stream) +(SOCKET:SOCKET-STREAM-PORT socket-stream) +(SOCKET:SOCKET-SERVICE-PORT &OPTIONAL service-name (protocol "tcp")) +(SOCKET:SOCKET-STREAM-PEER socket-stream [do-not-resolve-p]) +(SOCKET:SOCKET-STREAM-LOCAL socket-stream [do-not-resolve-p]) +(SOCKET:SOCKET-STREAM-SHUTDOWN socket-stream direction) +(SOCKET:SOCKET-OPTIONS socket-server &REST {option}*) Added: usocket/trunk/doc/cmucl-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/cmucl-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,56 @@ +http://cvs2.cons.org/ftp-area/cmucl/doc/cmu-user/internet.html + +extensions:lookup-host-entry host + +[structure] +host-entry + + name aliases addr-type addr-list + +[Function] +extensions:ip-string addr + +[Function] +extensions:create-inet-listener port &optional kind &key :reuse-address :backlog :interface + +[Function] +extensions:create-unix-listener path &optional kind :reuse-address :backlog + +[Function] +extensions:accept-tcp-connection unconnected + +[Function] +extensions:accept-unix-connection unconnected + +[Function] +extensions:connect-to-inet-socket host port &optional kind + +[Function] +extensions:connect-to-unix-socket path &optional kind + +[Function] +extensions:add-oob-handler fd char handler + +[Function] +extensions:remove-oob-handler fd char + +[Function] +extensions:remove-all-oob-handlers fd + +[Function] +extensions:send-character-out-of-band fd char + +[Function] +extensions:create-unix-socket &optional type + +[Function] +extensions:create-inet-socket &optional type + +[Function] +extensions:get-socket-option socket level optname + +[Function] +extensions:set-socket-option socket level optname optval + +[Function] +extensions:close-socket socket Added: usocket/trunk/doc/errors.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/errors.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,13 @@ +EADDRINUSE address-in-use-error +EAGAIN interrupted-error +EBADF bad-file-descriptor-error +ECONNREFUSED connection-refused-error +EINTR interrupted-error +EINVAL invalid-argument-error +ENOBUFS no-buffers-error +ENOMEM out-of-memory-error +EOPNOTSUPP operation-not-supported-error +EPERM operation-not-permitted-error +EPROTONOSUPPORT protocol-not-supported-error +ESOCKTNOSUPPORT socket-type-not-supported-error +ENETUNREACH network-unreachable-error Added: usocket/trunk/doc/lw-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/lw-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,16 @@ +http://www.lispworks.com/reference/lwu41/lwref/LWRM_37.HTM + +Package: COMM + +get-host-entry +get-socket-address +get-socket-peer-address +ip-address-string +open-tcp-stream +socket-stream-address +socket-stream-peer-address +start-up-server +start-up-server-and-mp +socket-stream +string-ip-address +with-noticed-socket-stream Added: usocket/trunk/doc/openmcl-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/openmcl-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,27 @@ +http://openmcl.clozure.com/Doc/sockets.html + + make-socket [Function] + accept-connection [Function] + dotted-to-ipaddr [Function] + ipaddr-to-dotted [Function] + ipaddr-to-hostname [Function] + lookup-hostname [Function] + lookup-port [Function] + receive-from [Function] + send-to [Function] + shutdown [Function] + socket-os-fd [Function] + remote-port [Function] + local-host [Function] + local-port [Function] + + socket-address-family [Function] + + socket-connect [Function] + socket-format [Function] + socket-type [Function] + socket-error [Class] + socket-error-code [Function] + socket-error-identifier [Function] + socket-error-situation [Function] + close [method] Added: usocket/trunk/doc/sb-bsd-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/sb-bsd-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,86 @@ +http://www.xach.com/sbcl/sb-bsd-sockets.html + +package: sb-bsd-sockets + +class: socket + +slots: + + * file-descriptor : + * family : + * protocol : + * type : + * stream : + +operators: + + (socket-bind (s socket) &rest address) Generic Function + (socket-accept (socket socket)) Method + (socket-connect (s socket) &rest address) Generic Function + (socket-peername (socket socket)) Method + (socket-name (socket socket)) Method + (socket-receive (socket socket) buffer length &key oob peek waitall (element-type 'character)) Method + (socket-listen (socket socket) backlog) Method + (socket-close (socket socket)) Method + (socket-make-stream (socket socket) &rest args) Method + + (sockopt-reuse-address (socket socket) argument) Accessor + (sockopt-keep-alive (socket socket) argument) Accessor + (sockopt-oob-inline (socket socket) argument) Accessor + (sockopt-bsd-compatible (socket socket) argument) Accessor + (sockopt-pass-credentials (socket socket) argument) Accessor + (sockopt-debug (socket socket) argument) Accessor + (sockopt-dont-route (socket socket) argument) Accessor + (sockopt-broadcast (socket socket) argument) Accessor + (sockopt-tcp-nodelay (socket socket) argument) Accessor + +inet-domain sockets + +class: inet-socket + +slots: + + * family : + +operators: + + (make-inet-address dotted-quads) Function + (get-protocol-by-name name) Function + (make-inet-socket type protocol) Function + +file-domain sockets + +class: unix-socket + +slots: + + * family : + +class: host-ent + +Slots: + + * name : + * aliases : + * address-type : + * addresses : + + (host-ent-address (host-ent host-ent)) Method + (get-host-by-name host-name) Function + (get-host-by-address address) Function + (name-service-error where) Function + (non-blocking-mode (socket socket)) Method + +(define-socket-condition sockint::EADDRINUSE address-in-use-error) +(define-socket-condition sockint::EAGAIN interrupted-error) +(define-socket-condition sockint::EBADF bad-file-descriptor-error) +(define-socket-condition sockint::ECONNREFUSED connection-refused-error) +(define-socket-condition sockint::EINTR interrupted-error) +(define-socket-condition sockint::EINVAL invalid-argument-error) +(define-socket-condition sockint::ENOBUFS no-buffers-error) +(define-socket-condition sockint::ENOMEM out-of-memory-error) +(define-socket-condition sockint::EOPNOTSUPP operation-not-supported-error) +(define-socket-condition sockint::EPERM operation-not-permitted-error) +(define-socket-condition sockint::EPROTONOSUPPORT protocol-not-supported-error) +(define-socket-condition sockint::ESOCKTNOSUPPORT socket-type-not-supported-error) +(define-socket-condition sockint::ENETUNREACH network-unreachable-error) Added: usocket/trunk/doc/usock-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/usock-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,28 @@ +Package: + + clisp : socket + cmucl : extensions + sbcl : sb-bsd-sockets + lw : comm + openmcl: openmcl-socket + allegro: sock + +Connecting (TCP/inet only) + + clisp : socket-connect port &optional [host] &key :element-type :external-format :buffered :timeout = > socket-stream + cmucl : connect-to-inet-socket host port &optional kind => file descriptor + sbcl : sb-socket-connect socket &rest address => socket + lw : open-tcp-stream hostname service &key direction element-type buffered => stream-object + openmcl: socket-connect socket => :active, :passive or nil + allegro: make-socket (&rest args &key type format connect address-family eol) => socket + +Closing + + clisp : close socket + cmucl : close-socket socket + sbcl : socket-close socket + lw : close socket + openmcl: close socket + allegro: close socket + +Errors \ No newline at end of file Added: usocket/trunk/package.lisp ============================================================================== --- (empty file) +++ usocket/trunk/package.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,31 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package :cl-user) + +#+lispworks (require "comm") + +(eval-when (:execute :load-toplevel :compile-toplevel) + (defpackage :usocket + (:use :cl) + (:nicknames :usoc) + (:shadowing-import-from "COMMON-LISP" :close + :open + :read-line + :write-sequence) + (:export :open ; socket related operations + :make-socket + :close + :read-line + :write-sequence + :socket ; socket object and accessors + :host + :port + :get-host-by-address ; name services + :get-host-by-name + :host-byte-order ; utility operators + :usocket-error ; conditions + :no-route-to-host))) + Added: usocket/trunk/test/package.lisp ============================================================================== --- (empty file) +++ usocket/trunk/test/package.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,13 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package :cl-user) + +(eval-when (:execute :load-toplevel :compile-toplevel) + (defpackage :usocket-test + (:use :cl :rt) + (:nicknames :usoct) + (:export :do-tests))) + Added: usocket/trunk/test/test-usocket.lisp ============================================================================== --- (empty file) +++ usocket/trunk/test/test-usocket.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,17 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket-test) + +(defvar *soc1* (usoc:make-socket :socket :stream + :host #(1 2 3 4) + :port 80 + :stream :my-stream)) + +(deftest make-socket.1 (usoc::real-socket usoct::*soc1*) :my-socket) +(deftest make-socket.2 (usoc::real-stream usoct::*soc1*) :my-stream) +(deftest make-socket.3 (usoc:host usoct::*soc1*) #(1 2 3 4)) +(deftest make-socket.4 (usoc:host usoct::*soc1*) 80) + Added: usocket/trunk/test/usocket-test.asd ============================================================================== --- (empty file) +++ usocket/trunk/test/usocket-test.asd Fri Jan 27 17:05:41 2006 @@ -0,0 +1,22 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package #:cl-user) + +(defpackage #:usocket-test-system + (:use #:cl #:asdf)) + +(in-package #:usocket-test-system) + +(defsystem usocket-test + :name "usocket-test" + :author "Erik Enge" + :version "0.1.0" + :licence "MIT" + :description "Tests for usocket" + :depends-on (:usocket :rt) + :components ((:file "package") + (:file "test-usocket" + :depends-on ("package")))) Added: usocket/trunk/usocket.asd ============================================================================== --- (empty file) +++ usocket/trunk/usocket.asd Fri Jan 27 17:05:41 2006 @@ -0,0 +1,39 @@ + +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package #:cl-user) + +(defpackage #:usocket-system + (:use #:cl #:asdf)) + +(in-package #:usocket-system) + +(defsystem usocket + :name "usocket" + :author "Erik Enge" + :version "0.1.0" + :licence "MIT" + :description "Universal socket library for Common Lisp" + :depends-on #+sbcl (:sb-bsd-sockets :split-sequence) + #-sbcl (:split-sequence) + :components ((:file "package") + (:file "usocket" + :depends-on ("package")) + (:file "condition" + :depends-on ("usocket")) + #+clisp (:file "clisp" :pathname "backend/clisp" + :depends-on ("condition")) + #+cmu (:file "cmucl" :pathname "backend/cmucl" + :depends-on ("condition")) + #+sbcl (:file "sbcl" :pathname "backend/sbcl" + :depends-on ("condition")) + #+lispworks (:file "lispworks" :pathname "backend/lispworks" + :depends-on ("condition")) + #+openmcl (:file "openmcl" :pathname "backend/openmcl" + :depends-on ("condition")) + #+allegro (:file "allegro" :pathname "backend/allegro" + :depends-on ("condition")) + )) Added: usocket/trunk/usocket.lisp ============================================================================== --- (empty file) +++ usocket/trunk/usocket.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,79 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defclass socket () + ((real-socket + :initarg :real-socket + :accessor real-socket) + (real-stream + :initarg :real-stream + :accessor real-stream) + (host + :initarg :host + :accessor host) + (port + :initarg :port + :accessor port))) + +(defun make-socket (&key socket host port (stream nil)) + (make-instance 'socket + :real-socket socket + :host host + :port port + :real-stream stream)) + +;; +;; Utility +;; + +(defun list-of-strings-to-integers (list) + "Take a list of strings and return a new list of integers (from +parse-integer) on each of the string elements." + (let ((new-list nil)) + (dolist (element (reverse list)) + (push (parse-integer element) new-list)) + new-list)) + +(defun hbo-to-dotted-quad (integer) + "Host-byte-order integer to dotted-quad string conversion utility." + (let ((first (ldb (byte 8 24) integer)) + (second (ldb (byte 8 16) integer)) + (third (ldb (byte 8 8) integer)) + (fourth (ldb (byte 8 0) integer))) + (format nil "~A.~A.~A.~A" first second third fourth))) + +(defun hbo-to-vector-quad (integer) + "Host-byte-order integer to dotted-quad string conversion utility." + (let ((first (ldb (byte 8 24) integer)) + (second (ldb (byte 8 16) integer)) + (third (ldb (byte 8 8) integer)) + (fourth (ldb (byte 8 0) integer))) + (vector first second third fourth))) + +(defun vector-quad-to-dotted-quad (vector) + (format nil "~A.~A.~A.~A" + (aref vector 0) + (aref vector 1) + (aref vector 2) + (aref vector 3))) + +(defun dotted-quad-to-vector-quad (string) + (let ((list (list-of-strings-to-integers (split-sequence:split-sequence #\. string)))) + (vector (first list) (second list) (third list) (fourth list)))) + +(defmethod host-byte-order ((string string)) + "Convert a string, such as 192.168.1.1, to host-byte-order, such as +3232235777." + (let ((list (list-of-strings-to-integers (split-sequence:split-sequence #\. string)))) + (+ (* (first list) 256 256 256) (* (second list) 256 256) + (* (third list) 256) (fourth list)))) + +(defmethod host-byte-order ((vector vector)) + "Convert a vector, such as #(192 168 1 1), to host-byte-order, such as +3232235777." + (+ (* (aref vector 0) 256 256 256) (* (aref vector 1) 256 256) + (* (aref vector 2) 256) (aref vector 3))) From ehuelsmann at common-lisp.net Fri Jan 27 23:22:30 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Fri, 27 Jan 2006 17:22:30 -0600 (CST) Subject: [usocket-cvs] r1 - public_html usocket usocket/branches usocket/tags usocket/trunk usocket/trunk/backend usocket/trunk/doc usocket/trunk/test Message-ID: <20060127232230.7CC851497B@common-lisp.net> Author: ehuelsmann Date: Fri Jan 27 17:05:41 2006 New Revision: 1 Added: public_html/ public_html/index.shtml public_html/project-name public_html/style.css usocket/ usocket/branches/ usocket/tags/ usocket/trunk/ (props changed) usocket/trunk/LICENSE usocket/trunk/Makefile usocket/trunk/README usocket/trunk/backend/ (props changed) usocket/trunk/backend/allegro.lisp usocket/trunk/backend/clisp.lisp usocket/trunk/backend/cmucl.lisp usocket/trunk/backend/lispworks.lisp usocket/trunk/backend/sbcl.lisp usocket/trunk/condition.lisp usocket/trunk/doc/ usocket/trunk/doc/allegro-socket.txt usocket/trunk/doc/clisp-sockets.txt usocket/trunk/doc/cmucl-sockets.txt usocket/trunk/doc/errors.txt usocket/trunk/doc/lw-sockets.txt usocket/trunk/doc/openmcl-sockets.txt usocket/trunk/doc/sb-bsd-sockets.txt usocket/trunk/doc/usock-sockets.txt usocket/trunk/package.lisp usocket/trunk/test/ (props changed) usocket/trunk/test/package.lisp usocket/trunk/test/test-usocket.lisp usocket/trunk/test/usocket-test.asd usocket/trunk/usocket.asd usocket/trunk/usocket.lisp Log: Initial import as copied off Erik Enge's home dir. Added: public_html/index.shtml ============================================================================== --- (empty file) +++ public_html/index.shtml Fri Jan 27 17:05:41 2006 @@ -0,0 +1,25 @@ + + + + +This is an automatically generated placeholder page: this project + has not yet created a website.
+ +Back to Common-lisp.net.
+ + + + Added: public_html/project-name ============================================================================== --- (empty file) +++ public_html/project-name Fri Jan 27 17:05:41 2006 @@ -0,0 +1 @@ +usocket Added: public_html/style.css ============================================================================== --- (empty file) +++ public_html/style.css Fri Jan 27 17:05:41 2006 @@ -0,0 +1,54 @@ + +.header { + font-size: medium; + background-color:#336699; + color:#ffffff; + border-style:solid; + border-width: 5px; + border-color:#002244; + padding: 1mm 1mm 1mm 5mm; +} + +.footer { + font-size: small; + font-style: italic; + text-align: right; + background-color:#336699; + color:#ffffff; + border-style:solid; + border-width: 2px; + border-color:#002244; + padding: 1mm 1mm 1mm 1mm; +} + +.footer a:link { + font-weight:bold; + color:#ffffff; + text-decoration:underline; +} + +.footer a:visited { + font-weight:bold; + color:#ffffff; + text-decoration:underline; +} + +.footer a:hover { + font-weight:bold; + color:#002244; + text-decoration:underline; } + +.check {font-size: x-small; + text-align:right;} + +.check a:link { font-weight:bold; + color:#a0a0ff; + text-decoration:underline; } + +.check a:visited { font-weight:bold; + color:#a0a0ff; + text-decoration:underline; } + +.check a:hover { font-weight:bold; + color:#000000; + text-decoration:underline; } Added: usocket/trunk/LICENSE ============================================================================== --- (empty file) +++ usocket/trunk/LICENSE Fri Jan 27 17:05:41 2006 @@ -0,0 +1,23 @@ +(This is the MIT / X Consortium license as taken from + http://www.opensource.org/licenses/mit-license.html) + +Copyright (c) 2003 Erik Enge + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Added: usocket/trunk/Makefile ============================================================================== --- (empty file) +++ usocket/trunk/Makefile Fri Jan 27 17:05:41 2006 @@ -0,0 +1,9 @@ +# $Id$ +# $Source$ + +clean: + find -name -o -name "*~" -o -name "*.err" -o -name "*.x86f" -o -name "*.lib" -o -name "*.fas" -o -name "*.fasl" -o -name "*.faslmt" -o -name "*.ufsl" | xargs rm + +commit: + make clean; cvs up; cvs ci + Added: usocket/trunk/README ============================================================================== --- (empty file) +++ usocket/trunk/README Fri Jan 27 17:05:41 2006 @@ -0,0 +1,17 @@ + +;; the backends must implement +;; +;; - handle-condition +;; - open +;; - close +;; - listen +;; - accept +;; - read-line +;; - write-sequence +;; - get-host-by-address +;; - get-host-by-name +;; +;; the backend must wrap all calls to its socket functions in a +;; handler-case/bind to make sure handle-condition is called. + +;; open should take either the hostname or an vectorized ip \ No newline at end of file Added: usocket/trunk/backend/allegro.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/allegro.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,34 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (declare (ignore type)) + (make-socket :socket (sock:make-socket :remote-host host + :remote-port port))) + +(defmethod close ((socket socket)) + "Close socket." + (sock:close (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-socket socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-socket socket))) + +(defun get-host-by-address (address) + (sock:lookup-host address)) + +(defun get-host-by-name (name) + (sock:lookup-host name)) Added: usocket/trunk/backend/clisp.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/clisp.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,40 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (declare (ignore type)) + (make-socket :socket (socket:socket-connect port host) + :host host + :port port)) + +(defmethod close ((socket socket)) + "Close socket." + (socket:socket-server-close (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-socket socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-socket socket))) + +(defun get-host-by-address (address) + (handler-case (posix:hostent-name + (posix:resolve-host-ipaddr (vector-quad-to-dotted-quad address))) + (condition (condition) (handle-condition condition)))) + +(defun get-host-by-name (name) + (handler-case (mapcar #'dotted-quad-to-vector-quad + (posix:hostent-addr-list (posix:resolve-host-ipaddr name))) + (condition (condition) (handle-condition condition)))) + Added: usocket/trunk/backend/cmucl.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/cmucl.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,41 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (let* ((socket (ext:connect-to-inet-socket (host-byte-order host) port type)) + (stream (sys:make-fd-stream socket :input t :output t :element-type 'character)) + (usocket (make-socket :socket socket :host host :port port :stream stream))) + usocket)) + +(defmethod close ((socket socket)) + "Close socket." + (ext:close-socket (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-stream socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-stream socket))) + +(defun get-host-by-address (address) + (handler-case (ext:host-entry-name + (ext::lookup-host-entry (host-byte-order address))) + (condition (condition) (handle-condition condition)))) + +(defun get-host-by-name (name) + (handler-case (mapcar #'hbo-to-vector-quad + (ext:host-entry-addr-list + (ext:lookup-host-entry name))) + (condition (condition) (handle-condition condition)))) + Added: usocket/trunk/backend/lispworks.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/lispworks.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,37 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + (declare (ignore type)) + (make-socket :socket (comm:open-tcp-stream host port) + :host host + :port port)) + +(defmethod close ((socket socket)) + "Close socket." + (cl:close (real-socket socket))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-socket socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-socket socket))) + +(defun get-host-by-address (address) + (comm:get-host-entry (vector-quad-to-dotted-quad address) + :fields '(:name))) + +(defun get-host-by-name (name) + (mapcar #'hbo-to-vector-quad + (comm:get-host-entry name :fields '(:addresses)))) Added: usocket/trunk/backend/sbcl.lisp ============================================================================== --- (empty file) +++ usocket/trunk/backend/sbcl.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,48 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defun handle-condition (condition &optional (socket nil)) + "Dispatch correct usocket condition." + (typecase condition + (condition (error 'usocket-error + :real-condition condition + :socket socket)))) + +(defun open (host port &optional (type :stream)) + "Connect to `host' on `port'. `host' is assumed to be a string of +an IP address represented in vector notation, such as #(192 168 1 1). +`port' is assumed to be an integer. + +Returns a socket object." + (let* ((socket (make-instance 'sb-bsd-sockets:inet-socket :type type :protocol :tcp)) + (stream (sb-bsd-sockets:socket-make-stream socket)) + (usocket (make-socket :socket socket :host host :port port :stream stream))) + (handler-case (sb-bsd-sockets:socket-connect socket host port) + (condition (condition) (handle-condition condition usocket))) + usocket)) + +(defmethod close ((socket socket)) + "Close socket." + (handler-case (sb-bsd-sockets:socket-close (real-socket socket)) + (condition (condition) (handle-condition condition socket)))) + +(defmethod read-line ((socket socket)) + (cl:read-line (real-stream socket))) + +(defmethod write-sequence ((socket socket) sequence) + (cl:write-sequence sequence (real-stream socket))) + +(defun get-host-by-address (address) + (handler-case (sb-bsd-sockets::host-ent-name + (sb-bsd-sockets:get-host-by-address address)) + (condition (condition) (handle-condition condition)))) + +(defun get-host-by-name (name) + (handler-case (sb-bsd-sockets::host-ent-addresses + (sb-bsd-sockets:get-host-by-name name)) + (condition (condition) (handle-condition condition)))) + Added: usocket/trunk/condition.lisp ============================================================================== --- (empty file) +++ usocket/trunk/condition.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,18 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(define-condition usocket-error (error) + ((real-condition + :reader real-condition + :initarg :real-condition) + (socket + :reader socket + :initarg :socket)) + (:report (lambda (c stream) + (format stream "Error (~A) occured in socket: ~A." + (real-condition c) (socket c))))) + Added: usocket/trunk/doc/allegro-socket.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/allegro-socket.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,46 @@ + + +(require :sock) + +accept-connection (sock passive-socket) &key wait Generic function. +dotted-to-ipaddr dotted &key errorp Function. +ipaddr-to-dotted ipaddr &key values Function. +ipaddr-to-hostname ipaddr Function. +lookup-hostname hostname +lookup-port portname protocol Function. +make-socket &key type format address-family connect &allow-other-keys Function. +with-pending-connect &body body Macro. +receive-from (sock datagram-socket) size &key buffer extract Generic function. +send-to sock &key +shutdown sock &key direction +socket-control stream &key output-chunking output-chunking-eof input-chunking +socket-os-fd sock Generic function. + +remote-host socket Generic function. +local-host socket Generic function. +local-port socket + +remote-filename socket +local-filename socket +remote-port socket +socket-address-family socket +socket-connect socket +socket-format socket +socket-type socket + +errors + +:address-in-use Local socket address already in use +:address-not-available Local socket address not available +:network-down Network is down +:network-reset Network has been reset +:connection-aborted Connection aborted +:connection-reset Connection reset by peer +:no-buffer-space No buffer space +:shutdown Connection shut down +:connection-timed-out Connection timed out +:connection-refused Connection refused +:host-down Host is down +:host-unreachable Host is unreachable +:unknown Unknown error + Added: usocket/trunk/doc/clisp-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/clisp-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,16 @@ +http://clisp.cons.org/impnotes.html#socket + +(SOCKET:SOCKET-SERVER &OPTIONAL [port-or-socket]) +(SOCKET:SOCKET-SERVER-HOST socket-server) +(SOCKET:SOCKET-SERVER-PORT socket-server) +(SOCKET:SOCKET-WAIT socket-server &OPTIONAL [seconds [microseconds]]) +(SOCKET:SOCKET-ACCEPT socket-server &KEY :ELEMENT-TYPE :EXTERNAL-FORMAT :BUFFERED :TIMEOUT) +(SOCKET:SOCKET-CONNECT port &OPTIONAL [host] &KEY :ELEMENT-TYPE :EXTERNAL-FORMAT :BUFFERED :TIMEOUT) +(SOCKET:SOCKET-STATUS socket-stream-or-list &OPTIONAL [seconds [microseconds]]) +(SOCKET:SOCKET-STREAM-HOST socket-stream) +(SOCKET:SOCKET-STREAM-PORT socket-stream) +(SOCKET:SOCKET-SERVICE-PORT &OPTIONAL service-name (protocol "tcp")) +(SOCKET:SOCKET-STREAM-PEER socket-stream [do-not-resolve-p]) +(SOCKET:SOCKET-STREAM-LOCAL socket-stream [do-not-resolve-p]) +(SOCKET:SOCKET-STREAM-SHUTDOWN socket-stream direction) +(SOCKET:SOCKET-OPTIONS socket-server &REST {option}*) Added: usocket/trunk/doc/cmucl-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/cmucl-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,56 @@ +http://cvs2.cons.org/ftp-area/cmucl/doc/cmu-user/internet.html + +extensions:lookup-host-entry host + +[structure] +host-entry + + name aliases addr-type addr-list + +[Function] +extensions:ip-string addr + +[Function] +extensions:create-inet-listener port &optional kind &key :reuse-address :backlog :interface + +[Function] +extensions:create-unix-listener path &optional kind :reuse-address :backlog + +[Function] +extensions:accept-tcp-connection unconnected + +[Function] +extensions:accept-unix-connection unconnected + +[Function] +extensions:connect-to-inet-socket host port &optional kind + +[Function] +extensions:connect-to-unix-socket path &optional kind + +[Function] +extensions:add-oob-handler fd char handler + +[Function] +extensions:remove-oob-handler fd char + +[Function] +extensions:remove-all-oob-handlers fd + +[Function] +extensions:send-character-out-of-band fd char + +[Function] +extensions:create-unix-socket &optional type + +[Function] +extensions:create-inet-socket &optional type + +[Function] +extensions:get-socket-option socket level optname + +[Function] +extensions:set-socket-option socket level optname optval + +[Function] +extensions:close-socket socket Added: usocket/trunk/doc/errors.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/errors.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,13 @@ +EADDRINUSE address-in-use-error +EAGAIN interrupted-error +EBADF bad-file-descriptor-error +ECONNREFUSED connection-refused-error +EINTR interrupted-error +EINVAL invalid-argument-error +ENOBUFS no-buffers-error +ENOMEM out-of-memory-error +EOPNOTSUPP operation-not-supported-error +EPERM operation-not-permitted-error +EPROTONOSUPPORT protocol-not-supported-error +ESOCKTNOSUPPORT socket-type-not-supported-error +ENETUNREACH network-unreachable-error Added: usocket/trunk/doc/lw-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/lw-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,16 @@ +http://www.lispworks.com/reference/lwu41/lwref/LWRM_37.HTM + +Package: COMM + +get-host-entry +get-socket-address +get-socket-peer-address +ip-address-string +open-tcp-stream +socket-stream-address +socket-stream-peer-address +start-up-server +start-up-server-and-mp +socket-stream +string-ip-address +with-noticed-socket-stream Added: usocket/trunk/doc/openmcl-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/openmcl-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,27 @@ +http://openmcl.clozure.com/Doc/sockets.html + + make-socket [Function] + accept-connection [Function] + dotted-to-ipaddr [Function] + ipaddr-to-dotted [Function] + ipaddr-to-hostname [Function] + lookup-hostname [Function] + lookup-port [Function] + receive-from [Function] + send-to [Function] + shutdown [Function] + socket-os-fd [Function] + remote-port [Function] + local-host [Function] + local-port [Function] + + socket-address-family [Function] + + socket-connect [Function] + socket-format [Function] + socket-type [Function] + socket-error [Class] + socket-error-code [Function] + socket-error-identifier [Function] + socket-error-situation [Function] + close [method] Added: usocket/trunk/doc/sb-bsd-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/sb-bsd-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,86 @@ +http://www.xach.com/sbcl/sb-bsd-sockets.html + +package: sb-bsd-sockets + +class: socket + +slots: + + * file-descriptor : + * family : + * protocol : + * type : + * stream : + +operators: + + (socket-bind (s socket) &rest address) Generic Function + (socket-accept (socket socket)) Method + (socket-connect (s socket) &rest address) Generic Function + (socket-peername (socket socket)) Method + (socket-name (socket socket)) Method + (socket-receive (socket socket) buffer length &key oob peek waitall (element-type 'character)) Method + (socket-listen (socket socket) backlog) Method + (socket-close (socket socket)) Method + (socket-make-stream (socket socket) &rest args) Method + + (sockopt-reuse-address (socket socket) argument) Accessor + (sockopt-keep-alive (socket socket) argument) Accessor + (sockopt-oob-inline (socket socket) argument) Accessor + (sockopt-bsd-compatible (socket socket) argument) Accessor + (sockopt-pass-credentials (socket socket) argument) Accessor + (sockopt-debug (socket socket) argument) Accessor + (sockopt-dont-route (socket socket) argument) Accessor + (sockopt-broadcast (socket socket) argument) Accessor + (sockopt-tcp-nodelay (socket socket) argument) Accessor + +inet-domain sockets + +class: inet-socket + +slots: + + * family : + +operators: + + (make-inet-address dotted-quads) Function + (get-protocol-by-name name) Function + (make-inet-socket type protocol) Function + +file-domain sockets + +class: unix-socket + +slots: + + * family : + +class: host-ent + +Slots: + + * name : + * aliases : + * address-type : + * addresses : + + (host-ent-address (host-ent host-ent)) Method + (get-host-by-name host-name) Function + (get-host-by-address address) Function + (name-service-error where) Function + (non-blocking-mode (socket socket)) Method + +(define-socket-condition sockint::EADDRINUSE address-in-use-error) +(define-socket-condition sockint::EAGAIN interrupted-error) +(define-socket-condition sockint::EBADF bad-file-descriptor-error) +(define-socket-condition sockint::ECONNREFUSED connection-refused-error) +(define-socket-condition sockint::EINTR interrupted-error) +(define-socket-condition sockint::EINVAL invalid-argument-error) +(define-socket-condition sockint::ENOBUFS no-buffers-error) +(define-socket-condition sockint::ENOMEM out-of-memory-error) +(define-socket-condition sockint::EOPNOTSUPP operation-not-supported-error) +(define-socket-condition sockint::EPERM operation-not-permitted-error) +(define-socket-condition sockint::EPROTONOSUPPORT protocol-not-supported-error) +(define-socket-condition sockint::ESOCKTNOSUPPORT socket-type-not-supported-error) +(define-socket-condition sockint::ENETUNREACH network-unreachable-error) Added: usocket/trunk/doc/usock-sockets.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/usock-sockets.txt Fri Jan 27 17:05:41 2006 @@ -0,0 +1,28 @@ +Package: + + clisp : socket + cmucl : extensions + sbcl : sb-bsd-sockets + lw : comm + openmcl: openmcl-socket + allegro: sock + +Connecting (TCP/inet only) + + clisp : socket-connect port &optional [host] &key :element-type :external-format :buffered :timeout = > socket-stream + cmucl : connect-to-inet-socket host port &optional kind => file descriptor + sbcl : sb-socket-connect socket &rest address => socket + lw : open-tcp-stream hostname service &key direction element-type buffered => stream-object + openmcl: socket-connect socket => :active, :passive or nil + allegro: make-socket (&rest args &key type format connect address-family eol) => socket + +Closing + + clisp : close socket + cmucl : close-socket socket + sbcl : socket-close socket + lw : close socket + openmcl: close socket + allegro: close socket + +Errors \ No newline at end of file Added: usocket/trunk/package.lisp ============================================================================== --- (empty file) +++ usocket/trunk/package.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,31 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package :cl-user) + +#+lispworks (require "comm") + +(eval-when (:execute :load-toplevel :compile-toplevel) + (defpackage :usocket + (:use :cl) + (:nicknames :usoc) + (:shadowing-import-from "COMMON-LISP" :close + :open + :read-line + :write-sequence) + (:export :open ; socket related operations + :make-socket + :close + :read-line + :write-sequence + :socket ; socket object and accessors + :host + :port + :get-host-by-address ; name services + :get-host-by-name + :host-byte-order ; utility operators + :usocket-error ; conditions + :no-route-to-host))) + Added: usocket/trunk/test/package.lisp ============================================================================== --- (empty file) +++ usocket/trunk/test/package.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,13 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package :cl-user) + +(eval-when (:execute :load-toplevel :compile-toplevel) + (defpackage :usocket-test + (:use :cl :rt) + (:nicknames :usoct) + (:export :do-tests))) + Added: usocket/trunk/test/test-usocket.lisp ============================================================================== --- (empty file) +++ usocket/trunk/test/test-usocket.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,17 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket-test) + +(defvar *soc1* (usoc:make-socket :socket :stream + :host #(1 2 3 4) + :port 80 + :stream :my-stream)) + +(deftest make-socket.1 (usoc::real-socket usoct::*soc1*) :my-socket) +(deftest make-socket.2 (usoc::real-stream usoct::*soc1*) :my-stream) +(deftest make-socket.3 (usoc:host usoct::*soc1*) #(1 2 3 4)) +(deftest make-socket.4 (usoc:host usoct::*soc1*) 80) + Added: usocket/trunk/test/usocket-test.asd ============================================================================== --- (empty file) +++ usocket/trunk/test/usocket-test.asd Fri Jan 27 17:05:41 2006 @@ -0,0 +1,22 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package #:cl-user) + +(defpackage #:usocket-test-system + (:use #:cl #:asdf)) + +(in-package #:usocket-test-system) + +(defsystem usocket-test + :name "usocket-test" + :author "Erik Enge" + :version "0.1.0" + :licence "MIT" + :description "Tests for usocket" + :depends-on (:usocket :rt) + :components ((:file "package") + (:file "test-usocket" + :depends-on ("package")))) Added: usocket/trunk/usocket.asd ============================================================================== --- (empty file) +++ usocket/trunk/usocket.asd Fri Jan 27 17:05:41 2006 @@ -0,0 +1,39 @@ + +;;;; $Id$ +;;;; $Source$ + +;;;; See the LICENSE file for licensing information. + +(in-package #:cl-user) + +(defpackage #:usocket-system + (:use #:cl #:asdf)) + +(in-package #:usocket-system) + +(defsystem usocket + :name "usocket" + :author "Erik Enge" + :version "0.1.0" + :licence "MIT" + :description "Universal socket library for Common Lisp" + :depends-on #+sbcl (:sb-bsd-sockets :split-sequence) + #-sbcl (:split-sequence) + :components ((:file "package") + (:file "usocket" + :depends-on ("package")) + (:file "condition" + :depends-on ("usocket")) + #+clisp (:file "clisp" :pathname "backend/clisp" + :depends-on ("condition")) + #+cmu (:file "cmucl" :pathname "backend/cmucl" + :depends-on ("condition")) + #+sbcl (:file "sbcl" :pathname "backend/sbcl" + :depends-on ("condition")) + #+lispworks (:file "lispworks" :pathname "backend/lispworks" + :depends-on ("condition")) + #+openmcl (:file "openmcl" :pathname "backend/openmcl" + :depends-on ("condition")) + #+allegro (:file "allegro" :pathname "backend/allegro" + :depends-on ("condition")) + )) Added: usocket/trunk/usocket.lisp ============================================================================== --- (empty file) +++ usocket/trunk/usocket.lisp Fri Jan 27 17:05:41 2006 @@ -0,0 +1,79 @@ +;;;; $Id$ +;;;; $Source$ + +;;;; See LICENSE for licensing information. + +(in-package :usocket) + +(defclass socket () + ((real-socket + :initarg :real-socket + :accessor real-socket) + (real-stream + :initarg :real-stream + :accessor real-stream) + (host + :initarg :host + :accessor host) + (port + :initarg :port + :accessor port))) + +(defun make-socket (&key socket host port (stream nil)) + (make-instance 'socket + :real-socket socket + :host host + :port port + :real-stream stream)) + +;; +;; Utility +;; + +(defun list-of-strings-to-integers (list) + "Take a list of strings and return a new list of integers (from +parse-integer) on each of the string elements." + (let ((new-list nil)) + (dolist (element (reverse list)) + (push (parse-integer element) new-list)) + new-list)) + +(defun hbo-to-dotted-quad (integer) + "Host-byte-order integer to dotted-quad string conversion utility." + (let ((first (ldb (byte 8 24) integer)) + (second (ldb (byte 8 16) integer)) + (third (ldb (byte 8 8) integer)) + (fourth (ldb (byte 8 0) integer))) + (format nil "~A.~A.~A.~A" first second third fourth))) + +(defun hbo-to-vector-quad (integer) + "Host-byte-order integer to dotted-quad string conversion utility." + (let ((first (ldb (byte 8 24) integer)) + (second (ldb (byte 8 16) integer)) + (third (ldb (byte 8 8) integer)) + (fourth (ldb (byte 8 0) integer))) + (vector first second third fourth))) + +(defun vector-quad-to-dotted-quad (vector) + (format nil "~A.~A.~A.~A" + (aref vector 0) + (aref vector 1) + (aref vector 2) + (aref vector 3))) + +(defun dotted-quad-to-vector-quad (string) + (let ((list (list-of-strings-to-integers (split-sequence:split-sequence #\. string)))) + (vector (first list) (second list) (third list) (fourth list)))) + +(defmethod host-byte-order ((string string)) + "Convert a string, such as 192.168.1.1, to host-byte-order, such as +3232235777." + (let ((list (list-of-strings-to-integers (split-sequence:split-sequence #\. string)))) + (+ (* (first list) 256 256 256) (* (second list) 256 256) + (* (third list) 256) (fourth list)))) + +(defmethod host-byte-order ((vector vector)) + "Convert a vector, such as #(192 168 1 1), to host-byte-order, such as +3232235777." + (+ (* (aref vector 0) 256 256 256) (* (aref vector 1) 256 256) + (* (aref vector 2) 256) (aref vector 3))) From ehuelsmann at common-lisp.net Sat Jan 28 19:58:33 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 28 Jan 2006 13:58:33 -0600 (CST) Subject: [usocket-cvs] r2 - public_html usocket/trunk/doc Message-ID: <20060128195833.ED8452A01A@common-lisp.net> Author: ehuelsmann Date: Sat Jan 28 13:56:16 2006 New Revision: 2 Added: usocket/trunk/doc/design.txt Modified: public_html/index.shtml Log: Update documentation. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Sat Jan 28 13:56:16 2006 @@ -13,8 +13,9 @@ -This is an automatically generated placeholder page: this project - has not yet created a website.
+This project has recently started. See the design +document for more information.
Back to Common-lisp.net.
Added: usocket/trunk/doc/design.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/design.txt Sat Jan 28 13:56:16 2006 @@ -0,0 +1,25 @@ + + -*- text -*- + + usocket: Universal sockets library + ================================== + +Contents +======== + + + +Design goal +=========== + +To provide a portable socket interface for as many implementations as +possible, while keeping the portability layer as thin as possible. + +Minimally, I'd like to support: + - SBCL + - CMUCL + - Allegro + - LispWorks + - ArmedBear (ABCL) + + From ehuelsmann at common-lisp.net Sat Jan 28 20:00:08 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 28 Jan 2006 14:00:08 -0600 (CST) Subject: [usocket-cvs] r2 - public_html usocket/trunk/doc Message-ID: <20060128200008.E28742A01A@common-lisp.net> Author: ehuelsmann Date: Sat Jan 28 13:56:16 2006 New Revision: 2 Added: usocket/trunk/doc/design.txt Modified: public_html/index.shtml Log: Update documentation. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Sat Jan 28 13:56:16 2006 @@ -13,8 +13,9 @@ -This is an automatically generated placeholder page: this project - has not yet created a website.
+This project has recently started. See the design +document for more information.
Back to Common-lisp.net.
Added: usocket/trunk/doc/design.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/design.txt Sat Jan 28 13:56:16 2006 @@ -0,0 +1,25 @@ + + -*- text -*- + + usocket: Universal sockets library + ================================== + +Contents +======== + + + +Design goal +=========== + +To provide a portable socket interface for as many implementations as +possible, while keeping the portability layer as thin as possible. + +Minimally, I'd like to support: + - SBCL + - CMUCL + - Allegro + - LispWorks + - ArmedBear (ABCL) + + From ehuelsmann at common-lisp.net Sat Jan 28 20:04:48 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 28 Jan 2006 14:04:48 -0600 (CST) Subject: [usocket-cvs] r2 - public_html usocket/trunk/doc Message-ID: <20060128200448.C13C1E008@common-lisp.net> Author: ehuelsmann Date: Sat Jan 28 13:56:16 2006 New Revision: 2 Added: usocket/trunk/doc/design.txt Modified: public_html/index.shtml Log: Update documentation. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Sat Jan 28 13:56:16 2006 @@ -13,8 +13,9 @@ -This is an automatically generated placeholder page: this project - has not yet created a website.
+This project has recently started. See the design +document for more information.
Back to Common-lisp.net.
Added: usocket/trunk/doc/design.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/design.txt Sat Jan 28 13:56:16 2006 @@ -0,0 +1,25 @@ + + -*- text -*- + + usocket: Universal sockets library + ================================== + +Contents +======== + + + +Design goal +=========== + +To provide a portable socket interface for as many implementations as +possible, while keeping the portability layer as thin as possible. + +Minimally, I'd like to support: + - SBCL + - CMUCL + - Allegro + - LispWorks + - ArmedBear (ABCL) + + From ehuelsmann at common-lisp.net Sat Jan 28 20:07:37 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 28 Jan 2006 14:07:37 -0600 (CST) Subject: [usocket-cvs] r2 - public_html usocket/trunk/doc Message-ID: <20060128200737.4B7AD11637@common-lisp.net> Author: ehuelsmann Date: Sat Jan 28 13:56:16 2006 New Revision: 2 Added: usocket/trunk/doc/design.txt Modified: public_html/index.shtml Log: Update documentation. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Sat Jan 28 13:56:16 2006 @@ -13,8 +13,9 @@ -This is an automatically generated placeholder page: this project - has not yet created a website.
+This project has recently started. See the design +document for more information.
Back to Common-lisp.net.
Added: usocket/trunk/doc/design.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/design.txt Sat Jan 28 13:56:16 2006 @@ -0,0 +1,25 @@ + + -*- text -*- + + usocket: Universal sockets library + ================================== + +Contents +======== + + + +Design goal +=========== + +To provide a portable socket interface for as many implementations as +possible, while keeping the portability layer as thin as possible. + +Minimally, I'd like to support: + - SBCL + - CMUCL + - Allegro + - LispWorks + - ArmedBear (ABCL) + + From ehuelsmann at common-lisp.net Sat Jan 28 20:08:05 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 28 Jan 2006 14:08:05 -0600 (CST) Subject: [usocket-cvs] r2 - public_html usocket/trunk/doc Message-ID: <20060128200805.48A5814973@common-lisp.net> Author: ehuelsmann Date: Sat Jan 28 13:56:16 2006 New Revision: 2 Added: usocket/trunk/doc/design.txt Modified: public_html/index.shtml Log: Update documentation. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Sat Jan 28 13:56:16 2006 @@ -13,8 +13,9 @@ -This is an automatically generated placeholder page: this project - has not yet created a website.
+This project has recently started. See the design +document for more information.
Back to Common-lisp.net.
Added: usocket/trunk/doc/design.txt ============================================================================== --- (empty file) +++ usocket/trunk/doc/design.txt Sat Jan 28 13:56:16 2006 @@ -0,0 +1,25 @@ + + -*- text -*- + + usocket: Universal sockets library + ================================== + +Contents +======== + + + +Design goal +=========== + +To provide a portable socket interface for as many implementations as +possible, while keeping the portability layer as thin as possible. + +Minimally, I'd like to support: + - SBCL + - CMUCL + - Allegro + - LispWorks + - ArmedBear (ABCL) + + From ehuelsmann at common-lisp.net Sat Jan 28 20:11:03 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 28 Jan 2006 14:11:03 -0600 (CST) Subject: [usocket-cvs] r3 - public_html Message-ID: <20060128201103.4521E1F02F@common-lisp.net> Author: ehuelsmann Date: Sat Jan 28 14:11:02 2006 New Revision: 3 Modified: public_html/index.shtml Log: Correct link to the design document. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Sat Jan 28 14:11:02 2006 @@ -14,7 +14,7 @@This project has recently started. See the design +href="http://common-lisp.net/websvn/filedetails.php?repname=usocket&path=%2Fusocket%2Ftrunk%2Fdoc%2Fdesign.txt&rev=0&sc=0">the design document for more information.
Back to Common-lisp.net.
From ehuelsmann at common-lisp.net Sat Jan 28 22:52:58 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sat, 28 Jan 2006 16:52:58 -0600 (CST) Subject: [usocket-cvs] r4 - usocket/trunk/doc Message-ID: <20060128225258.6731F2A01A@common-lisp.net> Author: ehuelsmann Date: Sat Jan 28 16:52:58 2006 New Revision: 4 Modified: usocket/trunk/doc/design.txt (contents, props changed) Log: Update design document. Modified: usocket/trunk/doc/design.txt ============================================================================== --- usocket/trunk/doc/design.txt (original) +++ usocket/trunk/doc/design.txt Sat Jan 28 16:52:58 2006 @@ -1,19 +1,72 @@ -*- text -*- +$Id$ + + usocket: Universal sockets library ================================== Contents ======== + * Motivation + * Design goal + * Functional requirements + + + + +Motivation +========== + +There are 2 other portability sockets packages [that I know of] +out there: + 1) trivial-sockets + 2) acl-compat (which is a *lot* broader, but contains sockets too) +The first misses some functionality which is fundamental when +the requirements stop being 'trivial', such as finding out the +addresses of either side connected to the tcp/ip stream. + +The second, being a complete compatibility library for Allegro, +contains much more than only sockets. Next to that, as the docs +say, is it mainly directed at providing the functionality required +to port portable-allegroserve - meaning it may be (very) incomplete +on some platforms. + +So, that's why I decided to inherit Erik Enge's project to build +a library with the intention to provide portability code in only +1 area of programming, targeted at 'not so trivial' programming. + +Also, I need this library to extend cl-irc with full DCC functionality. + + Design goal =========== -To provide a portable socket interface for as many implementations as -possible, while keeping the portability layer as thin as possible. +To provide a portable TCP/IP socket interface for as many +implementations as possible, while keeping the portability layer +as thin as possible. + + + +Functional requirements +======================= + +The interface provided should allow: + - 'client'/active sockets + - 'server'/listening sockets + - retrieve IP addresses/ports for both sides of the connection + - provide the usual stream methods to operate on the connection stream + (not necessarily the socket itself; maybe a socket slot too) + +Several relevant support functionalities will have to be provided too: + - long <-> quad-vector operators + - quad-vector <-> string operators + - hostname <-> quad-vector operators (hostname resolution) + Minimally, I'd like to support: - SBCL From ehuelsmann at common-lisp.net Sun Jan 29 19:23:39 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sun, 29 Jan 2006 13:23:39 -0600 (CST) Subject: [usocket-cvs] r6 - public_html usocket/trunk/doc Message-ID: <20060129192339.50083D07F@common-lisp.net> Author: ehuelsmann Date: Sun Jan 29 13:23:36 2006 New Revision: 6 Modified: public_html/index.shtml public_html/style.css usocket/trunk/doc/design.txt Log: Update website and sync design document. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Sun Jan 29 13:23:36 2006 @@ -13,13 +13,110 @@ +This project has recently started. See the design document for more information.
-Back to Common-lisp.net.
+Development discussion takes place on + usocket-devel at common-lisp.net. + Please feel free to join and chip in! (This currently being a single man project, please announce yourself.) +
+ +Major steps | Implementations | +||||||
---|---|---|---|---|---|---|---|
+ | Minor steps | +SBCL | +CMUCL | +ABCL | +clisp | +Allegro | +LispWorks | +
Minimal active sockets support
+ at the same level as provided by
+ trivial-sockets. + (Meaning streamed tcp traffic on connected sockets.) |
+ Investigate interfaces provided. | +TODO | +TODO | +TODO | +TODO | +TODO | +TODO | +
Implement active socket support. | +TODO | +TODO | +TODO | +TODO | +TODO | +TODO | +|
Add functions to retrieve socket properties. + Such as local and remote IP address and port. |
+ Investigate interfaces provided | +TODO | +TODO | +TODO | +TODO | +TODO | +TODO | +
Implement it. | +TODO | +TODO | +TODO | +TODO | +TODO | +TODO | +|
Add support for passive (connection-accepting/server) + sockets. | +Investigate interfaces provided | +TODO | +TODO | +TODO | +TODO | +TODO | +TODO | +
Implement passive socket support. | +TODO | +TODO | +TODO | +TODO | +TODO | +TODO | +