Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. import strutils, sockets, httpserver
  2.  
  3. var counter = 0
  4. proc handleRequest(client: TSocket, path, query: string): bool {.procvar.} =
  5. inc(counter)
  6. client.send("Hello for the $#th time." % $counter & wwwNL)
  7. return false # do not stop processing
  8.  
  9. run(handleRequest, TPort(5000))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement