From psmith@common-lisp.net Wed Jan 3 23:10:41 2007 From: psmith@common-lisp.net To: nio-cvs@common-lisp.net Subject: [nio-cvs] r24 - in branches/home/psmith/restructure/src: io protocol/http Date: Wed, 03 Jan 2007 23:10:41 -0500 Message-ID: <20070104041041.207C421013@common-lisp.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2270121859594693367==" --===============2270121859594693367== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Author: psmith Date: Wed Jan 3 23:10:39 2007 New Revision: 24 Modified: branches/home/psmith/restructure/src/io/async-fd.lisp branches/home/psmith/restructure/src/io/nio.asd branches/home/psmith/restructure/src/protocol/http/http-state-machine.lisp Log: Corrected packet defn Modified: branches/home/psmith/restructure/src/io/async-fd.lisp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/home/psmith/restructure/src/io/async-fd.lisp (original) +++ branches/home/psmith/restructure/src/io/async-fd.lisp Wed Jan 3 23:10:39= 2007 @@ -99,20 +99,8 @@ (with-slots (close-pending) async-fd (setf close-pending t))) =20 - -(defclass packet () - ((buffer :initarg :buffer :initform nil :documentation "Foreign array") - (size :initarg :size :initform 0) - (written :initarg :written :initform 0))) - - ;;; FUNCTIONS =20 - - - - - (define-condition read-error (error) ()) =20 ;; "Read more data from STATE-MACHINE." Modified: branches/home/psmith/restructure/src/io/nio.asd =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/home/psmith/restructure/src/io/nio.asd (original) +++ branches/home/psmith/restructure/src/io/nio.asd Wed Jan 3 23:10:39 2007 @@ -6,6 +6,7 @@ =20 :components ((:file "nio-package") (:file "fd-helper" :depends-on ("nio-package")) + (:file "packet" :depends-on ("nio-package")) (:file "async-fd" :depends-on ("fd-helper")) (:file "async-socket" :depends-on ("async-fd")) (:file "nio-server" :depends-on ("async-socket")) Modified: branches/home/psmith/restructure/src/protocol/http/http-state-machi= ne.lisp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- branches/home/psmith/restructure/src/protocol/http/http-state-machine.lis= p (original) +++ branches/home/psmith/restructure/src/protocol/http/http-state-machine.lis= p Wed Jan 3 23:10:39 2007 @@ -38,13 +38,10 @@ (defmethod process-read((sm http-state-machine)) (with-slots (foreign-read-buffer foreign-write-buffer) sm=20 #+nio-debug (format t "process-read got: ~A~%" (get-string foreign-read-b= uffer)) -;;todo create packet and get-bytes (nio-buffer:map-to-foreign foreign-write-buffer (get-bytes (http-respons= e :status :ok :html " ock "))) (close-sm sm))) =20 =20 -;;end TODO - (defun page-not-found (client) (serve-content client :not-found "text/html" (string-to-octets "