[nio-cvs] r72 - branches/home/psmith/restructure/src/nio-logger
psmith at common-lisp.net
psmith at common-lisp.net
Tue Feb 6 01:29:42 UTC 2007
Author: psmith
Date: Mon Feb 5 20:29:41 2007
New Revision: 72
Modified:
branches/home/psmith/restructure/src/nio-logger/nio-logger.lisp
branches/home/psmith/restructure/src/nio-logger/run-logging-server.lisp
branches/home/psmith/restructure/src/nio-logger/run.sh
Log:
Updates to logging server for cmd line usage
Modified: branches/home/psmith/restructure/src/nio-logger/nio-logger.lisp
==============================================================================
--- branches/home/psmith/restructure/src/nio-logger/nio-logger.lisp (original)
+++ branches/home/psmith/restructure/src/nio-logger/nio-logger.lisp Mon Feb 5 20:29:41 2007
@@ -58,10 +58,11 @@
(defparameter +log-file-name+ "./out")
-(defun run-logging-server()
+(defun run-logging-server(listen-ip out-file &optional (allowed-ips "ips.txt"))
(setf nio-yarpc:+process-jobs-inline+ nil)
- (nio:load-ips "ips.txt")
- (sb-thread:make-thread #'(lambda()(nio:start-server 'identity 'identity 'nio-yarpc:yarpc-state-machine :host "127.0.0.1" :accept-connection 'nio:check-ip)) :name "nio-server")
+ (setf +log-file-name+ out-file)
+ (nio:load-ips allowed-ips)
+ (sb-thread:make-thread #'(lambda()(nio:start-server 'identity 'identity 'nio-yarpc:yarpc-state-machine :host listen-ip :accept-connection 'nio:check-ip)) :name "nio-server")
(loop
;;block waiting for jobs
(nio-yarpc:run-job)))
Modified: branches/home/psmith/restructure/src/nio-logger/run-logging-server.lisp
==============================================================================
--- branches/home/psmith/restructure/src/nio-logger/run-logging-server.lisp (original)
+++ branches/home/psmith/restructure/src/nio-logger/run-logging-server.lisp Mon Feb 5 20:29:41 2007
@@ -28,4 +28,9 @@
(push :nio-debug *features*)
(require :asdf)
(require :nio-logger)
-(nio-logger:run-logging-server)
+
+(let ((listen-ip (second sb-ext:*posix-argv*))
+ (out-file (third sb-ext:*posix-argv*))
+ (allowed-ips-filename (fourth sb-ext:*posix-argv*)))
+ (format t "Starting logging Server with ~A ~A ~A~%" listen-ip out-file allowed-ips-filename)
+ (nio-logger:run-logging-server listen-ip out-file allowed-ips-filename))
Modified: branches/home/psmith/restructure/src/nio-logger/run.sh
==============================================================================
--- branches/home/psmith/restructure/src/nio-logger/run.sh (original)
+++ branches/home/psmith/restructure/src/nio-logger/run.sh Mon Feb 5 20:29:41 2007
@@ -1,8 +1,8 @@
#!/bin/bash
#
# run.sh <logging-client in-file dest-ip>
-# run.sh <logging-server out-file>
+# run.sh <logging-server listen-ip out-file allowed-ips-filename>
#
export LANG=en_US.UTF-8
-sbcl --load run-$1.lisp --end-toplevel-options $2 $3
+sbcl --load run-$1.lisp --end-toplevel-options $2 $3 $4
More information about the Nio-cvs
mailing list