From ehuelsmann at common-lisp.net Mon Dec 18 20:50:28 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Mon, 18 Dec 2006 15:50:28 -0500 (EST) Subject: [usocket-cvs] r124 - public_html Message-ID: <20061218205028.537075F000@common-lisp.net> Author: ehuelsmann Date: Mon Dec 18 15:50:27 2006 New Revision: 124 Modified: public_html/index.shtml Log: Update website with my latest ideas about interface guarantees. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Mon Dec 18 15:50:27 2006 @@ -20,6 +20,12 @@ 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.

@@ -40,11 +46,12 @@

Community

-

This project has recently started. There isn't much of a community - yet, except me (Erik Huelsmann). So, you're invited to join the mailing - list, announce yourself and maybe even join the effort. +

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 at common-lisp.net.

@@ -272,6 +279,13 @@ +

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

Releases are uploaded to the releases/ From ehuelsmann at common-lisp.net Mon Dec 18 21:20:57 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Mon, 18 Dec 2006 16:20:57 -0500 (EST) Subject: [usocket-cvs] r125 - public_html public_html/releases usocket/tags/0.2.0 usocket/trunk Message-ID: <20061218212057.D583416035@common-lisp.net> Author: ehuelsmann Date: Mon Dec 18 16:20:56 2006 New Revision: 125 Added: public_html/releases/usocket-0.2.0.tar.gz (contents, props changed) public_html/releases/usocket-0.2.0.tar.gz.asc usocket/tags/0.2.0/ - copied from r124, usocket/trunk/ Modified: public_html/index.shtml usocket/tags/0.2.0/usocket.asd usocket/trunk/usocket.asd Log: Release version 0.2.0, bump trunk version to 0.3.0-dev. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Mon Dec 18 16:20:56 2006 @@ -288,12 +288,26 @@

Releases

+

Current release

Releases are uploaded to the releases/ directory.

The latest release is version 0.1.0.

+ + + + + +
Release history
ReleaseSummary
0.2.0Add support for + Scieneer + Common Lisp, fix issue #6 and + API preparation for server side sockets (not in this release)
0.1.0Initial release
+ + +

Project history

Added: public_html/releases/usocket-0.2.0.tar.gz ============================================================================== Binary file. No diff available. Added: public_html/releases/usocket-0.2.0.tar.gz.asc ============================================================================== --- (empty file) +++ public_html/releases/usocket-0.2.0.tar.gz.asc Mon Dec 18 16:20:56 2006 @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.1 (GNU/Linux) + +iD8DBQBFhwW3i5O0Epaz9TkRArerAJ4zeTOFprwWoWvoEJSA+TN8CLHM5gCfeIEx +hOvwkye/bqTXE0sEHFO9zFs= +=rHoU +-----END PGP SIGNATURE----- Modified: usocket/tags/0.2.0/usocket.asd ============================================================================== --- usocket/trunk/usocket.asd (original) +++ usocket/tags/0.2.0/usocket.asd Mon Dec 18 16:20:56 2006 @@ -14,7 +14,7 @@ (defsystem usocket :name "usocket" :author "Erik Enge & Erik Huelsmann" - :version "0.2.0-dev" + :version "0.2.0" :licence "MIT" :description "Universal socket library for Common Lisp" :depends-on (:split-sequence Modified: usocket/trunk/usocket.asd ============================================================================== --- usocket/trunk/usocket.asd (original) +++ usocket/trunk/usocket.asd Mon Dec 18 16:20:56 2006 @@ -14,7 +14,7 @@ (defsystem usocket :name "usocket" :author "Erik Enge & Erik Huelsmann" - :version "0.2.0-dev" + :version "0.3.0-dev" :licence "MIT" :description "Universal socket library for Common Lisp" :depends-on (:split-sequence From ehuelsmann at common-lisp.net Mon Dec 18 21:29:03 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Mon, 18 Dec 2006 16:29:03 -0500 (EST) Subject: [usocket-cvs] r126 - public_html Message-ID: <20061218212903.3D1CF16035@common-lisp.net> Author: ehuelsmann Date: Mon Dec 18 16:29:02 2006 New Revision: 126 Modified: public_html/index.shtml Log: Update reference to newest version. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Mon Dec 18 16:29:02 2006 @@ -290,20 +290,19 @@

Current release

Releases are uploaded to the releases/ - directory.

- -

The latest release is version 0.1.0.

+ directory. You can find short descriptions in the table below:

- - + + - + +
Release history
ReleaseSummary
0.2.0Add support for +
DateReleaseSummary
Dec 18, 20060.2.0Add support for Scieneer Common Lisp, fix issue #6 and API preparation for server side sockets (not in this release)
0.1.0Initial release
Feb 13, 20060.1.0Initial release
From ehuelsmann at common-lisp.net Mon Dec 18 22:16:57 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Mon, 18 Dec 2006 17:16:57 -0500 (EST) Subject: [usocket-cvs] r127 - in trivial-usocket: . branches tags trunk trunk/test Message-ID: <20061218221657.994AC7C009@common-lisp.net> Author: ehuelsmann Date: Mon Dec 18 17:16:57 2006 New Revision: 127 Added: trivial-usocket/ trivial-usocket/branches/ trivial-usocket/tags/ trivial-usocket/trunk/ (props changed) trivial-usocket/trunk/test/ trivial-usocket/trunk/trivial-usocket.asd trivial-usocket/trunk/trivial-usocket.lisp Log: Start independent trivial-usocket project, a trivial-sockets migration path to usocket. Added: trivial-usocket/trunk/trivial-usocket.asd ============================================================================== --- (empty file) +++ trivial-usocket/trunk/trivial-usocket.asd Mon Dec 18 17:16:57 2006 @@ -0,0 +1,19 @@ + +;;;; $Id$ +;;;; $URL$ + +;;;; See the LICENSE file for licensing information. + +(cl:defpackage #:trivial-usocket-system + (:use #:cl #:asdf)) + +(cl:in-package #:trivial-usocket-system) + +(defsystem trivial-usocket + :name "trivial-usocket" + :author "Erik Huelsmann" + :version "0.2.0-dev" + :licence "MIT" + :description "trivial-sockets compatibility layer for usocket" + :depends-on (#:usocket #:trivial-gray-streams) + :components ((:file "trivial-usocket"))) Added: trivial-usocket/trunk/trivial-usocket.lisp ============================================================================== --- (empty file) +++ trivial-usocket/trunk/trivial-usocket.lisp Mon Dec 18 17:16:57 2006 @@ -0,0 +1,170 @@ + +;;;; $Id$ +;;;; $URL$ + +;;;; See the LICENSE file for licensing information. + +(defpackage :trivial-usocket + (:use #:cl + #:trivial-gray-streams + #:usocket) + (:export #:open-stream + #:usocket + #:unsupported)) + +(in-package :trivial-usocket) + +;; Condition raised by operations with unsupported arguments +;; For trivial-sockets compatibility. + +(define-condition unsupported (error) + ((feature :initarg :feature :reader unsupported-feature))) + + +(defclass usocket-mixin (trivial-gray-stream-mixin) + ((socket + :initarg :usocket + :accessor usocket + :documentation "")) + (:documentation "A stream which forwards all calls to the stream +associated with the socket, still allowing the original socket to be +retrieved.")) + +;; retrieval of the socket is something not all implementations allow +;; for the streams they associate with the sockets; that's why we have +;; a special stream which does allow it. + + +;; We need to implement these symbols (for forwarding-stream-mixin): + +(defmethod stream-read-char ((stream usocket-mixin)) + (read-char (socket-stream (usocket stream)) nil :eof)) + +(defmethod stream-unread-char ((stream usocket-mixin) char) + (unread-char char (socket-stream (usocket stream)))) + +(defmethod stream-read-char-no-hang ((stream usocket-mixin)) + (read-char-no-hang (socket-stream (usocket stream)))) + +(defmethod stream-peek-char ((stream usocket-mixin)) + (peek-char nil (socket-stream (usocket stream)) nil :eof)) + +(defmethod stream-listen ((stream usocket-mixin)) + (listen (socket-stream (usocket stream)))) + +(defmethod stream-read-line ((stream usocket-mixin)) + (let ((line (read-line (socket-stream (usocket stream)) nil :eof))) + (if (eq line :eof) + (values "" t) + (values line nil)))) + +(defmethod stream-clear-input ((stream usocket-mixin)) + (clear-input (socket-stream (usocket stream)))) + +(defmethod stream-write-char ((stream usocket-mixin) char) + (write-char char (socket-stream (usocket stream)))) + +(defmethod stream-line-column ((stream usocket-mixin)) + nil) + +(defmethod stream-start-line-p ((stream usocket-mixin)) + nil) + +(defmethod stream-write-string ((stream usocket-mixin) + string &optional start end) + (write-string string (socket-stream (usocket stream)) + :start (or start 0) + :end (or end (length string)))) + +(defmethod stream-terpri ((stream usocket-mixin)) + (terpri (socket-stream (usocket stream)))) + +(defmethod stream-fresh-line ((stream usocket-mixin)) + (fresh-line (socket-stream (usocket stream)))) + +(defmethod stream-finish-output ((stream usocket-mixin)) + (finish-output (socket-stream (usocket stream)))) + +(defmethod stream-force-output ((stream usocket-mixin)) + (force-output (socket-stream (usocket stream)))) + +(defmethod stream-clear-output ((non-stream usocket-mixin)) + (clear-output (socket-stream (usocket non-stream)))) + +(defmethod stream-advance-to-column ((stream usocket-mixin) column) + nil) + +(defmethod close ((stream usocket-mixin) &key abort) + (close (socket-stream (usocket stream)) :abort abort)) + +(defmethod stream-read-byte ((non-stream usocket-mixin)) + (read-byte (socket-stream (usocket non-stream)) nil :eof)) + +(defmethod stream-write-byte ((non-stream usocket-mixin) integer) + (write-byte integer (socket-stream (usocket non-stream)))) + +(defmethod stream-read-sequence ((stream usocket-mixin) seq start end + &key &allow-other-keys) + (read-sequence seq (socket-stream (usocket stream)) + :start (or start 0) + :end (or end (length seq)))) + +(defmethod stream-write-sequence ((stream usocket-mixin) seq start end + &key &allow-other-keys) + (write-sequence seq (socket-stream (usocket stream)) + :start (or start 0) + :end (or end (length seq)))) + + +;; We also need to implement forwarding streams: +;; +;; forwarding-input-stream +;; forwarding-output-stream +;; forwarding-io-stream +;; +;; which are derived from their ancestors (fundamental-*) and +;; the forwarding mixin. + +(defclass usocket-input-stream (fundamental-input-stream usocket-mixin) + ()) + +(defclass usocket-output-stream (fundamental-output-stream usocket-mixin) + ()) + +(defclass usocket-io-stream (fundamental-input-stream + fundamental-output-stream + usocket-mixin) + ()) + +(defun wrap-usocket-stream (usocket &rest rest) + "" + (let* ((ustream (socket-stream usocket)) + (istream-p (input-stream-p ustream)) + (ostream-p (output-stream-p ustream))) + (apply #'make-instance + (cond + ((and istream-p ostream-p) + 'usocket-io-stream) + (istream-p 'usocket-input-stream) + (ostream-p 'usocket-output-stream) + (t (error "Unsupported stream type"))) + :usocket usocket + rest))) + +(defun open-stream (peer-host peer-port + &key (local-host :any) + (local-port 0) + (external-format :default) + (element-type 'character) + (protocol :tcp)) + (unless (eq protocol :tcp) + (error 'unsupported :feature `(:protocol ,protocol))) + (unless (and (eql local-host :any) (eql local-port 0)) + (error 'unsupported :feature :bind)) + (unless (eql external-format :default) + (error 'unsupported :feature :external-format)) + (unless (eql element-type 'character) + (error 'unsupported :feature :element-type)) + (let ((socket (socket-connect peer-host peer-port))) + (wrap-usocket-stream socket))) + From ehuelsmann at common-lisp.net Mon Dec 18 22:20:13 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Mon, 18 Dec 2006 17:20:13 -0500 (EST) Subject: [usocket-cvs] r128 - trivial-usocket/trunk Message-ID: <20061218222013.666727C009@common-lisp.net> Author: ehuelsmann Date: Mon Dec 18 17:20:13 2006 New Revision: 128 Modified: trivial-usocket/trunk/trivial-usocket.asd Log: Correct trivial-usocket version number: We don't have releases yet... Modified: trivial-usocket/trunk/trivial-usocket.asd ============================================================================== --- trivial-usocket/trunk/trivial-usocket.asd (original) +++ trivial-usocket/trunk/trivial-usocket.asd Mon Dec 18 17:20:13 2006 @@ -12,7 +12,7 @@ (defsystem trivial-usocket :name "trivial-usocket" :author "Erik Huelsmann" - :version "0.2.0-dev" + :version "0.1.0-dev" :licence "MIT" :description "trivial-sockets compatibility layer for usocket" :depends-on (#:usocket #:trivial-gray-streams) From ehuelsmann at common-lisp.net Thu Dec 21 22:08:01 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Thu, 21 Dec 2006 17:08:01 -0500 (EST) Subject: [usocket-cvs] r129 - usocket/trunk Message-ID: <20061221220801.E105C5B06D@common-lisp.net> Author: ehuelsmann Date: Thu Dec 21 17:08:01 2006 New Revision: 129 Modified: usocket/trunk/usocket.lisp Log: Remove interface now provided in trivial-usocket. Modified: usocket/trunk/usocket.lisp ============================================================================== --- usocket/trunk/usocket.lisp (original) +++ usocket/trunk/usocket.lisp Thu Dec 21 17:08:01 2006 @@ -51,26 +51,6 @@ object." (make-instance 'stream-server-usocket :socket socket)) -(defun open-stream (peer-host peer-port - &key (local-host :any) - (local-port 0) - (external-format :default) - (element-type 'character) - (protocol :tcp)) - "trivial-sockets compat function to make usocket a drop-in replacement -apart from the package naming difference." - (unless (and (eql local-host :any) (eql local-port 0)) - (error 'unsupported :feature :bind)) - (unless (eql protocol :tcp) - (error 'unsupported :feature `(:protocol ,protocol))) - (unless (eql external-format :default) - (error 'unsupported :feature :external-format)) - (unless (eql element-type 'character) - (error 'unsupported :feature :element-type)) - (let ((sock (socket-connect peer-host peer-port))) - (when sock - (socket-stream sock)))) - (defgeneric socket-close (usocket) (:documentation "Close a previously opened `usocket'.")) From ehuelsmann at common-lisp.net Thu Dec 21 22:29:19 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Thu, 21 Dec 2006 17:29:19 -0500 (EST) Subject: [usocket-cvs] r130 - public_html public_html/releases usocket/tags/0.2.1 Message-ID: <20061221222919.E09DB5C179@common-lisp.net> Author: ehuelsmann Date: Thu Dec 21 17:29:18 2006 New Revision: 130 Added: public_html/releases/usocket-0.2.1.tar.gz (contents, props changed) public_html/releases/usocket-0.2.1.tar.gz.asc usocket/tags/0.2.1/ - copied from r129, usocket/trunk/ Modified: public_html/index.shtml Log: Upload 0.2.1 release, which removes unsupported interface. Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml (original) +++ public_html/index.shtml Thu Dec 21 17:29:18 2006 @@ -295,6 +295,9 @@ + +
Release history
DateReleaseSummary
Dec 21, 20060.2.1Remove 'open-stream' interface which is supposed + to be provided by the 'trivial-usocket' package.
Dec 18, 2006 0.2.0Add support for Scieneer Added: public_html/releases/usocket-0.2.1.tar.gz ============================================================================== Binary file. No diff available. Added: public_html/releases/usocket-0.2.1.tar.gz.asc ============================================================================== --- (empty file) +++ public_html/releases/usocket-0.2.1.tar.gz.asc Thu Dec 21 17:29:18 2006 @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.1 (GNU/Linux) + +iD8DBQBFiwpci5O0Epaz9TkRAtUOAJ9RlUgtXGUbDKKtYl0N5egaKoqQFACfQhYn +80dxIfA78Xkl33Zl0EQcfFA= +=PfQH +-----END PGP SIGNATURE----- From ehuelsmann at common-lisp.net Thu Dec 21 22:53:31 2006 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Thu, 21 Dec 2006 17:53:31 -0500 (EST) Subject: [usocket-cvs] r131 - trivial-usocket/trunk usocket/trunk/backend Message-ID: <20061221225331.C87C325002@common-lisp.net> Author: ehuelsmann Date: Thu Dec 21 17:53:28 2006 New Revision: 131 Modified: trivial-usocket/trunk/trivial-usocket.lisp usocket/trunk/backend/allegro.lisp usocket/trunk/backend/armedbear.lisp usocket/trunk/backend/clisp.lisp usocket/trunk/backend/cmucl.lisp usocket/trunk/backend/lispworks.lisp usocket/trunk/backend/openmcl.lisp usocket/trunk/backend/sbcl.lisp usocket/trunk/backend/scl.lisp Log: Add support for the 'element-type' stream creation argument. Modified: trivial-usocket/trunk/trivial-usocket.lisp ============================================================================== --- trivial-usocket/trunk/trivial-usocket.lisp (original) +++ trivial-usocket/trunk/trivial-usocket.lisp Thu Dec 21 17:53:28 2006 @@ -163,8 +163,6 @@ (error 'unsupported :feature :bind)) (unless (eql external-format :default) (error 'unsupported :feature :external-format)) - (unless (eql element-type 'character) - (error 'unsupported :feature :element-type)) (let ((socket (socket-connect peer-host peer-port))) (wrap-usocket-stream socket))) Modified: usocket/trunk/backend/allegro.lisp ============================================================================== --- usocket/trunk/backend/allegro.lisp (original) +++ usocket/trunk/backend/allegro.lisp Thu Dec 21 17:53:28 2006 @@ -36,12 +36,14 @@ :real-error condition :socket socket)))))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character) (let ((socket)) (setf socket (with-mapped-conditions (socket) (socket:make-socket :remote-host (host-to-hostname host) - :remote-port port))) + :remote-port port + :format (if (subtypep element-type 'character) + :text :binary)))) (make-stream-socket :socket socket :stream socket))) (defmethod socket-close ((usocket usocket)) Modified: usocket/trunk/backend/armedbear.lisp ============================================================================== --- usocket/trunk/backend/armedbear.lisp (original) +++ usocket/trunk/backend/armedbear.lisp Thu Dec 21 17:53:28 2006 @@ -11,13 +11,15 @@ (typecase condition (error (error 'unknown-error :socket socket :real-error condition)))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character)) (let ((usock)) (with-mapped-conditions (usock) (let ((sock (ext:make-socket (host-to-hostname host) port))) (setf usock - (make-stream-socket :socket sock - :stream (ext:get-socket-stream sock))))))) + (make-stream-socket + :socket sock + :stream (ext:get-socket-stream sock + :element-type element-type))))))) (defmethod socket-close ((usocket usocket)) (with-mapped-conditions (usocket) Modified: usocket/trunk/backend/clisp.lisp ============================================================================== --- usocket/trunk/backend/clisp.lisp (original) +++ usocket/trunk/backend/clisp.lisp Thu Dec 21 17:53:28 2006 @@ -38,13 +38,13 @@ :socket socket :real-error condition)))))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character)) (let ((socket) (hostname (host-to-hostname host))) (with-mapped-conditions (socket) (setf socket (socket:socket-connect port hostname - :element-type 'character + :element-type element-type :buffered t))) (make-stream-socket :socket socket :stream socket))) ;; the socket is a stream too Modified: usocket/trunk/backend/cmucl.lisp ============================================================================== --- usocket/trunk/backend/cmucl.lisp (original) +++ usocket/trunk/backend/cmucl.lisp Thu Dec 21 17:53:28 2006 @@ -53,14 +53,14 @@ :real-condition condition :socket socket)))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character)) (let* ((socket)) (setf socket (with-mapped-conditions (socket) (ext:connect-to-inet-socket (host-to-hbo host) port :stream))) (if socket (let* ((stream (sys:make-fd-stream socket :input t :output t - :element-type 'character + :element-type element-type :buffering :full)) ;;###FIXME the above line probably needs an :external-format (usocket (make-stream-socket :socket socket Modified: usocket/trunk/backend/lispworks.lisp ============================================================================== --- usocket/trunk/backend/lispworks.lisp (original) +++ usocket/trunk/backend/lispworks.lisp Thu Dec 21 17:53:28 2006 @@ -47,12 +47,13 @@ ;; :real-condition condition ;; :socket socket)))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character)) (let ((hostname (host-to-hostname host)) (stream)) (setf stream (with-mapped-conditions () - (comm:open-tcp-stream hostname port))) + (comm:open-tcp-stream hostname port + :element-type element-type))) (if stream (make-stream-socket :socket (comm:socket-stream-socket stream) :stream stream) Modified: usocket/trunk/backend/openmcl.lisp ============================================================================== --- usocket/trunk/backend/openmcl.lisp (original) +++ usocket/trunk/backend/openmcl.lisp Thu Dec 21 17:53:28 2006 @@ -40,12 +40,15 @@ (error (error 'unknown-error :socket socket :real-error condition)) (condition (signal 'unknown-condition :real-condition condition)))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character)) (with-mapped-conditions () (let ((mcl-sock (openmcl-socket:make-socket :remote-host (host-to-hostname host) :remote-port port))) - (openmcl-socket:socket-connect mcl-sock) + (openmcl-socket:socket-connect mcl-sock + :element-type (if (subtypep element-type + 'character) + :text :binary)) (make-stream-socket :stream mcl-sock :socket mcl-sock)))) (defmethod socket-close ((usocket usocket)) Modified: usocket/trunk/backend/sbcl.lisp ============================================================================== --- usocket/trunk/backend/sbcl.lisp (original) +++ usocket/trunk/backend/sbcl.lisp Thu Dec 21 17:53:28 2006 @@ -59,14 +59,14 @@ :real-condition condition)))))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character)) (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)) + :element-type element-type)) ;;###FIXME: The above line probably needs an :external-format (usocket (make-stream-socket :stream stream :socket socket)) (ip (host-to-vector-quad host))) Modified: usocket/trunk/backend/scl.lisp ============================================================================== --- usocket/trunk/backend/scl.lisp (original) +++ usocket/trunk/backend/scl.lisp Thu Dec 21 17:53:28 2006 @@ -33,12 +33,12 @@ :real-condition condition :socket socket)))) -(defun socket-connect (host port) +(defun socket-connect (host port &key (element-type 'character)) (let* ((socket (with-mapped-conditions (nil) (ext:connect-to-inet-socket (host-to-hbo host) port :kind :stream))) (stream (sys:make-fd-stream socket :input t :output t - :element-type 'character + :element-type element-type :buffering :full))) ;;###FIXME the above line probably needs an :external-format (make-stream-socket :socket socket :stream stream)))