hello
I am making simple networking program, server and client
but it doesn't working properly
the "received" string is displayed on server side
but that's not a my intention
I try to give and take variables but fails again and again
could somebody please let me know what I have to do?



server source:
#lang racket
(require racket/tcp)
(define listener (tcp-listen 12345))
(let echo-server ()
(define-values (in out) (tcp-accept listener))
(display "received")
(display (read in))
(thread (lambda () (copy-port in out)
(close-output-port out)))
(echo-server))

client source:
#lang racket
(define-values (in out) (tcp-connect/enable-break "localhost" 12345))
(display "1" out)(display "2" out)
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to