preliminary work on adding sessions stickiness
This commit is contained in:
parent
83911cc5f7
commit
11bcec1052
@ -1,6 +1,5 @@
|
||||
FEATURES
|
||||
1. Create a racket module for commonly used functions
|
||||
2. Log error messages and channel conservations to proper files on server
|
||||
4. message parsable?
|
||||
5. command parsable?
|
||||
7. maybe fiddle around with irc library
|
||||
@ -10,7 +9,9 @@ FEATURES
|
||||
e
|
||||
12. Hide user's own input in command line
|
||||
14. bye message prompt for clients
|
||||
15. Session stickiness for clients
|
||||
*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
|
||||
16. plain tcp -> ssl based
|
||||
17. fix breaks for improper disconnects from clients
|
||||
18. Add topics after project completion
|
||||
|
@ -1,14 +1,26 @@
|
||||
#lang racket
|
||||
(require math/base) ;; for random number generation
|
||||
;; TODO clean up string message output and alignment
|
||||
;; i.e. seconds and minutes hours specifically
|
||||
;; author: Ibrahim Mkusa
|
||||
;; about: print and read concurrently
|
||||
;; notes: output may need to be aligned and formatted nicely
|
||||
|
||||
|
||||
|
||||
(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" 'append))
|
||||
(define hermes-conf-s (make-semaphore 1))
|
||||
|
||||
(define convs-out (open-output-file "./convs.out" 'append))
|
||||
(define convs-out-s (make-semaphore 1))
|
||||
|
||||
(define error-out (open-output-file "./error.out" 'append))
|
||||
(define error-out-s (make-semaphore 1))
|
||||
|
||||
; custodian for client connections
|
||||
(define main-client-cust (make-custodian))
|
||||
@ -17,9 +29,10 @@
|
||||
(parameterize ([current-custodian main-client-cust])
|
||||
;; connect to server at port 8080
|
||||
(define-values (in out) (tcp-connect host3 port-no)) ;; define values
|
||||
(display in)
|
||||
(displayln out)
|
||||
;; binds to multiple values akin to unpacking tuples in python
|
||||
|
||||
; store username to a file for later retrieval along with relevent
|
||||
; info used for authentication with server
|
||||
(displayln "What's your name?")
|
||||
(define username (read-line))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user