Permalink
Browse files

Broke up files to only one real export per file.

  • Loading branch information...
nklein committed Oct 14, 2012
1 parent 19e5596 commit 84b27bb0246c6be959c477d5a2beedd066d5cc7f
@@ -0,0 +1,22 @@
+(defpackage :unet-sockets-address+port-not-available-error
+ (:use :cl)
+ (:export :address+port-not-available-error
+ :address+port-not-available-error-address
+ :address+port-not-available-error-port))
+
+(in-package :unet-sockets-address+port-not-available-error)
+
+(define-condition address+port-not-available-error (error)
+ ((address :initarg :address
+ :reader address+port-not-available-error-address)
+ (port :initarg :port
+ :reader address+port-not-available-error-port)))
+
+(defmethod print-object ((ana address+port-not-available-error) stream)
+ (with-accessors ((address address+port-not-available-error-address)
+ (port address+port-not-available-error-port))
+ ana
+ (print-unreadable-object (ana stream :type t)
+ (format stream ":ADDRESS ~S :PORT ~S" address port))))
+
+
@@ -0,0 +1,8 @@
+(defpackage :unet-sockets-create-datagram-socket
+ (:use :cl)
+ (:export :create-datagram-socket))
+
+(in-package :unet-sockets-create-datagram-socket)
+
+(defgeneric create-datagram-socket (sockets-interface ip-address port)
+ (:documentation "Create a socket instance bound to IP-ADDRESS and PORT. The IP-ADDRESS can be either the keyword :INADDR-ANY or an address as returned by GET-ADDRESS. This method returns an instance of a subclass of BASE-SOCKET."))
View
@@ -0,0 +1,8 @@
+(defpackage :unet-sockets-get-address
+ (:use :cl)
+ (:export :get-address))
+
+(in-package :unet-sockets-get-address)
+
+(defgeneric get-address (sockets-interface hostname)
+ (:documentation "Using the SOCKETS-INTERFACE instance, resolve the HOSTNAME string into an IP address. This method will throw a HOSTNAME-NOT-FOUND-ERROR if the IP address of the given HOSTNAME cannot be determined. The returned address should be considered an opaque type. It is implementation-specific."))
@@ -0,0 +1,16 @@
+(defpackage :unet-sockets-hostname-not-found-error
+ (:use :cl)
+ (:export :hostname-not-found-error
+ :hostname-not-found-error-hostname))
+
+(in-package :unet-sockets-hostname-not-found-error)
+
+(define-condition hostname-not-found-error (error)
+ ((hostname :initarg :hostname
+ :reader hostname-not-found-error-hostname)))
+
+(defmethod print-object ((hnf hostname-not-found-error) stream)
+ (with-accessors ((hostname hostname-not-found-error-hostname)) hnf
+ (print-unreadable-object (hnf stream :type t)
+ (format stream ":HOSTNAME ~S" hostname))))
+
@@ -0,0 +1,8 @@
+(defpackage :unet-sockets-poll-datagram
+ (:use :cl)
+ (:export :poll-datagram))
+
+(in-package :unet-sockets-poll-datagram)
+
+(defgeneric poll-datagram (socket)
+ (:documentation "Poll the SOCKET that was returned from CREATE-DATAGRAM-SOCKET for messages. This method return the next datagram available from the socket or NIL if there were none."))
@@ -0,0 +1,8 @@
+(defpackage :unet-sockets-send-datagram
+ (:use :cl)
+ (:export :send-datagram))
+
+(in-package :unet-sockets-send-datagram)
+
+(defgeneric send-datagram (socket data ip-address port)
+ (:documentation "Given the SOCKET that was returned by CREATE-DATAGRAM-SOCKET, send the DATA to the given PORT at the specified IP-ADDRESS (as returned by GET-ADDRESS)."))

0 comments on commit 84b27bb

Please sign in to comment.