about summary refs log blame commit diff stats
path: root/server-socket.mu
blob: 8a9b27efc60eb066a8ade71eb8332d4151b94e02 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                           
def main [
  local-scope
  socket:number <- $socket 8080/port
  $print [Mu socket creation returned ], socket, 10/newline
  session:number <- $accept socket
  {
    client-message:address:buffer <- new-buffer 1024
    c:character <- $read-from-socket session
    break-unless c
    $print c
    loop
  }
  $close-socket socket, session
]