From 63c4e2e1854deee38bdd655623a11d71a7bae6b6 Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Sat, 15 Apr 2017 21:06:14 -0400 Subject: [PATCH] client logs end with _client and server logs end with _server --- Hermes/TODO | 4 +--- Hermes/client.rkt | 10 ++++++---- Hermes/server.rkt | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Hermes/TODO b/Hermes/TODO index f5f0a1c..6bd88b0 100644 --- a/Hermes/TODO +++ b/Hermes/TODO @@ -1,5 +1,4 @@ FEATURES -1. Create a racket module for commonly used functions 4. message parsable? 5. command parsable? 7. maybe fiddle around with irc library @@ -7,8 +6,7 @@ FEATURES 10. authentication for databases 11. user can ask for no of logged in users. Server has to pars e -12. Hide user's own input in command line -14. bye message prompt for clients +*14. bye message prompt for clients part of session stickiness *15. Session stickiness for clients. Log received comms to a local file. additionally save user details and prompt user to use defaults or create new ones diff --git a/Hermes/client.rkt b/Hermes/client.rkt index 9f20dc4..96f55b0 100644 --- a/Hermes/client.rkt +++ b/Hermes/client.rkt @@ -1,4 +1,6 @@ #lang racket + +(require "modules/general.rkt") (require math/base) ;; for random number generation ;; TODO clean up string message output and alignment ;; i.e. seconds and minutes hours specifically @@ -7,19 +9,19 @@ ;; notes: output may need to be aligned and formatted nicely - +; i could prompt for these instead (define host "10.0.0.160") ; internal home (define host2 "67.186.191.81") (define host3 "localhost") (define port-num 4321) -(define hermes-conf (open-output-file "./hermes.conf" #:exists'append)) +(define hermes-conf (open-output-file "./hermes_client.conf" #:exists'append)) (define hermes-conf-s (make-semaphore 1)) -(define convs-out (open-output-file "./convs.out" #:exists 'append)) +(define convs-out (open-output-file "./convs_client.out" #:exists 'append)) (define convs-out-s (make-semaphore 1)) -(define error-out (open-output-file "./error.out" #:exists 'append)) +(define error-out (open-output-file "./error_client.out" #:exists 'append)) (define error-out-s (make-semaphore 1)) ; custodian for client connections diff --git a/Hermes/server.rkt b/Hermes/server.rkt index a309ddc..ba2c1c2 100644 --- a/Hermes/server.rkt +++ b/Hermes/server.rkt @@ -76,8 +76,8 @@ (define messages-s (make-semaphore 1)) ;; control access to messages ; two files to store error messages, and channel conversations -(define error-out (open-output-file "/home/pcuser/Hermes/Hermes/error.txt" #:exists 'append)) -(define convs-out (open-output-file "/home/pcuser/Hermes/Hermes/conversations.txt" #:exists 'append)) +(define error-out (open-output-file "/home/pcuser/Hermes/Hermes/error_server.txt" #:exists 'append)) +(define convs-out (open-output-file "/home/pcuser/Hermes/Hermes/conversations_server.txt" #:exists 'append)) (define error-out-s (make-semaphore 1)) (define convs-out-s (make-semaphore 1)) ; TODO finish logging all error related messages to