about summary refs log tree commit diff stats
path: root/wiki/lib/plugins/usermanager/lang/hr/delete.txt
Commit message (Expand)AuthorAgeFilesLines
* installed dokuwiki, added to navbar, updated newsahriman2018-12-031-0/+1
server-socket.mu?h=main&id=3d91759b87636bd81fb71ab937bee31ca543fc68'>3d91759b ^
68578a78 ^

a7c59e3e ^
68578a78 ^
29fe558a ^
192d59d3 ^
4543a0dd ^
f03c9c05 ^
433a7c7b ^
25cd8e98 ^




801e8b50 ^
25cd8e98 ^
215e35e4 ^

68578a78 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28




                                                             
 


                                                                           

             
                                             
                                                           
                      
                               
                                                            
                                                         
                              




                                                
 
                                                                 

                                  
 
# example program: a single-request HTTP server
#   listen for connections from clients on a server socket
#   when a connection occurs, transfer it to a session socket
#   read from it using channels
#   write to it directly
#
# After running it, navigate to localhost:8080. Your browser should display
# "SUCCESS!" and the server will terminate after one connection.

def main [
  local-scope
  socket:num <- $open-server-socket 8080/port
  $print [Mu socket creation returned ], socket, 10/newline
  return-unless socket
  session:num <- $accept socket
  contents:&:source:char, sink:&:sink:char <- new-channel 30
  sink <- start-running receive-from-socket session, sink
  query:text <- drain contents
  $print [Done reading from socket.], 10/newline
  write-to-socket session, [HTTP/1.0 200 OK
Content-type: text/plain

SUCCESS!
]
  $print 10/newline, [Wrote to and closing socket...], 10/newline
  session <- $close-socket session
  socket <- $close-socket socket
]