> From: Amit Saha <amitsaha...@gmail.com> > Date: Mon, 27 Apr 2009 21:02:40 +0530 > > [...] > (define (start-server service) > ((let ((server-sock (open-tcp-server-socket service))) > (display "Server ready to accept connections..") > (newline) > (let ((from-client (read-line (tcp-server-connection-accept > server-sock #t #f)))) > (display from-client)))) > (close-tcp-server-socket server-sock) > ) > [...] > Isn't the 'read-line' correct way to do it?
I guess. You intend to echo one line and disconnect? Don't feel like closing the connection explicitly? > [...] > Anything else I am missing? I cannot miss the "((let" in line 2. I rarely see that in code -- only when someone has a short (let ...) snippet that looks up a procedure (for a fancy dispatch). My paren flasher suggests you are passing it zero arguments. You don't get an error message before the disconnect, about a bogus value that should be a procedure? _______________________________________________ MIT-Scheme-users mailing list MIT-Scheme-users@gnu.org http://lists.gnu.org/mailman/listinfo/mit-scheme-users