diff --git a/src/main/connection.cl b/src/main/connection.cl index ffaef8c..c8ba17f 100644 --- a/src/main/connection.cl +++ b/src/main/connection.cl @@ -10,7 +10,12 @@ ;;;; %File Description: ;;;; -;;;; +;;;; This file defines the abstract base class of connection classes. +;;;; A connection keeps all the state that is related to a network +;;;; connection. The implementation-dependent drivers create an +;;;; instance of an implementation-dependent subclass of this for each +;;;; connection they receive and pass it to the responsible server +;;;; object. ;;;; (defconstant +connection-states+ @@ -24,20 +29,11 @@ (defgeneric connection-stream (connection)) +(defgeneric connection-address (connection)) + +(defgeneric connection-hostname (connection)) + (defgeneric close-connection (connection)) (defmethod close-connection :after ((connection connection)) (setf (connection-state connection) :closed)) - -(defclass simple-connection (connection) - ((stream :initarg :stream :reader connection-stream))) - -(defmethod close-connection ((connection simple-connection)) - (handler-case - (close (connection-stream connection)) - (error (condition) - #-CLASH-DEBUG nil - #+CLASH-DEBUG - (format t "~&;;; At ~D Error closing connection ~A:~%;;; ~A~&" - (get-internal-real-time) - connection condition))))