From 4543a0dda5843c0a7af6a51462ecf3d7af63b5ce Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 22 Sep 2016 00:40:59 -0700 Subject: 3404 --- server-socket.mu | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/server-socket.mu b/server-socket.mu index 3da870ca..3538b687 100644 --- a/server-socket.mu +++ b/server-socket.mu @@ -1,15 +1,15 @@ # Example of reading from a socket using channels and writing back to it -# directly. Running this file and navigating to
:8081 +# directly. Running this file and navigating to
:8080 # should result in your browser displaying "SUCCESS!". # # Unfortunately, the reading implementation has some redundant, inelegant -# code to make up for my lack of insight into Linux's socket internal. +# code to make up for my lack of insight into Linux's socket internals. def main [ local-scope - socket:num <- $socket 8081/port + socket:num <- $socket 8080/port $print [Mu socket creation returned ], socket, 10/newline session:num <- $accept socket - contents:&:source:char, sink:&:sink:char <- new-channel 5096 + contents:&:source:char, sink:&:sink:char <- new-channel 30 sink <- start-running transmit-from-socket session, sink buf:&:buffer <- new-buffer 30 { @@ -50,7 +50,7 @@ def transmit-from-socket session:num, sink:&:sink:char -> sink:&:sink:char [ local-scope load-ingredients { - req:text, bytes-read:number <- $read-from-socket session, 4096/bytes + req:text, bytes-read:number <- $read-from-socket session, 4096/bytes $print [read ], bytes-read, [ bytes from socket], 10/newline i:number <- copy 0 { -- cgit 1.4.1-2-gfad0 53a748fcd9cfad1'>commit diff stats