Added a tracker for todo items and started added utility functions

This commit is contained in:
Ibrahim Mkusa 2017-04-12 12:33:13 -04:00
parent 282197b144
commit 8984b45ac1
2 changed files with 13 additions and 16 deletions

7
Hermes/TODO.txt Normal file
View File

@ -0,0 +1,7 @@
1. Create a racket module for commonly used functions
2. Log messages to proper file on server
3. add timestamps to clients messages
4. message parsable?
5. command parsable?
6. keep count of connected clients using object orientation
7.

View File

@ -1,28 +1,18 @@
#lang racket #lang racket
(require math/base) ;; for random number generation (require math/base) ;; for random number generation
;; TODO clean up string message output and alignment ;; TODO clean up string message output and alignment
;; author: Ibrahim Mkusa ;; author: Ibrahim Mkusa
;; about: print and read concurrently ;; about: print and read concurrently
;; notes: output may need to be aligned and formatted nicely ;; notes: output may need to be aligned and formatted nicely
;; look into ;; look into
;; https://docs.racket-lang.org/gui/text-field_.html#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._text-field~25%29._get-editor%29%29 ;; https://docs.racket-lang.org/gui/text-field_.html#%28meth._%28%28%28lib._mred%2Fmain..rkt%29._text-field~25%29._get-editor%29%29
;; create custodian for managing all resources ; Takes a string and a semaphore to print safely to stdout
;; so we can shutdown everything at once (define displayln-safe
;(define guard (make-custodian (current-custodian))) (lambda (a-string a-semaphore)
;(current-custodian guard) (semaphore-wait a-semaphore)
;; reads values continously from stdin and redisplays them (displayln a-string)
(semaphore-post a-semaphore)))
;; Notes connect to server on localhost
;; use client template of tcpvanilla
;; use event for read-write
;; modify read-loop-i
; read a value and send it to server via output-port
; is there something in the input port. If yes? display it
; in the hello world
; custodian for client connections ; custodian for client connections
(define main-client-cust (make-custodian)) (define main-client-cust (make-custodian))