Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moved socket listening conditions from conditions.lisp to listen.lisp.

  • Loading branch information...
commit 40dc597161a71a2e0e13441e44fd44c434ef6fc1 1 parent 491200e
@flambard authored
Showing with 22 additions and 12 deletions.
  1. +0 −12 src/conditions.lisp
  2. +22 −0 src/listen.lisp
View
12 src/conditions.lisp
@@ -4,18 +4,6 @@
((comment :reader comment :initarg :comment))
(:documentation "The signaling function is not implemented yet."))
-(define-condition already-listening-on-socket (error)
- ((port :reader port :initarg :port))
- (:documentation "This error is signaled when trying to listen on a socket when already listening on an existing socket."))
-
-(define-condition not-listening-on-socket (error)
- ()
- (:documentation "This condition is signaled when trying to accept connections with a listening socket."))
-
-(defun start-listening-on-socket-restart (condition)
- (declare (ignore condition))
- (invoke-restart 'start-listening-on-socket))
-
(define-condition try-again ()
((reason :reader reason :initarg :reason))
(:documentation "This condition is signaled when trying to connect to a remote node that is busy."))
View
22 src/listen.lisp
@@ -3,6 +3,28 @@
(defvar *listening-socket* nil
"The listening socket. NIL if not listening.")
+
+;;;
+;;; Conditions
+;;;
+
+(define-condition already-listening-on-socket (error)
+ ((port :reader port :initarg :port))
+ (:documentation "This error is signaled when trying to listen on a socket when already listening on an existing socket."))
+
+(define-condition not-listening-on-socket (error)
+ ()
+ (:documentation "This condition is signaled when trying to accept connections with a listening socket."))
+
+(defun start-listening-on-socket-restart (condition)
+ (declare (ignore condition))
+ (invoke-restart 'start-listening-on-socket))
+
+
+;;;
+;;; Socket listening functions
+;;;
+
(defun listening-p ()
(not (null *listening-socket*)))
Please sign in to comment.
Something went wrong with that request. Please try again.