Author: ehuelsmann
Date: Thu Jan 4 17:48:22 2007
New Revision: 165
Modified:
trunk/cl-irc.asd
trunk/command.lisp
trunk/protocol.lisp
trunk/utility.lisp
Log:
Change trivial-sockets dependency to usocket as discussed many moons ago.
This commit adds support for all usocket supported lisps, except that
they're not all supported by (cl-irc::start-process ...).
Modified: trunk/cl-irc.asd
==============================================================================
--- trunk/cl-irc.asd (original)
+++ trunk/cl-irc.asd Thu Jan 4 17:48:22 2007
@@ -16,7 +16,7 @@
:version "0.5.2"
:licence "MIT"
:description "Common Lisp interface to the IRC protocol"
- :depends-on (:split-sequence :trivial-sockets :flexi-streams)
+ :depends-on (:split-sequence :usocket :flexi-streams)
:properties ((#:author-email . "cl-irc-devel(a)common-lisp.net")
(#:date . "$Date$")
((#:albert #:output-dir) . "doc/api-doc/")
Modified: trunk/command.lisp
==============================================================================
--- trunk/command.lisp (original)
+++ trunk/command.lisp Thu Jan 4 17:48:22 2007
@@ -249,8 +249,11 @@
(connection-type 'connection)
(logging-stream t))
"Connect to server and return a connection object."
- (let* ((stream (socket-connect server port))
+ (let* ((socket (usocket:socket-connect server port
+ :element-type 'flexi-streams:octet))
+ (stream (usocket:socket-stream socket))
(connection (make-connection :connection-type connection-type
+ :socket socket
:network-stream stream
:client-stream logging-stream
:server-name server))
Modified: trunk/protocol.lisp
==============================================================================
--- trunk/protocol.lisp (original)
+++ trunk/protocol.lisp Thu Jan 4 17:48:22 2007
@@ -122,6 +122,9 @@
:initarg :server-port
:accessor server-port
:initform *default-irc-server-port*)
+ (socket
+ :initarg :socket
+ :documentation "Slot to store socket (for internal use only).")
(network-stream
:initarg :network-stream
:accessor network-stream
@@ -199,6 +202,7 @@
(password nil)
(server-name "")
(server-port nil)
+ (socket nil)
(network-stream nil)
(outgoing-external-format *default-outgoing-external-format*)
(client-stream t)
@@ -212,6 +216,7 @@
:password password
:server-name server-name
:server-port server-port
+ :socket socket
:network-stream network-stream
:output-stream output-stream
:client-stream client-stream)))
Modified: trunk/utility.lisp
==============================================================================
--- trunk/utility.lisp (original)
+++ trunk/utility.lisp Thu Jan 4 17:48:22 2007
@@ -101,10 +101,6 @@
(fourth (ldb (byte 8 0) integer)))
(vector first second third fourth)))
-(defun socket-connect (server port)
- "Create a socket connected to `server':`port' and return stream for it."
- (trivial-sockets:open-stream server port :element-type '(unsigned-byte 8)))
-
(defun external-format-fixup (format)
(let ((new-format (copy-list format)))
(setf (getf (cdr new-format) :eol-style) :crlf)