Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 59 lines (40 sloc) 1.814 kb
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
-*- org -*-

* TODO [#B] ipv6 support
  :LOGBOOK:
  - Note taken on [2010-05-22 Sat 03:31] \\
    code snippet from glguy:
    
    -- | 'withSocket' opens a socket on the given 'SockAddr',
    -- executes the given continuation and then closes the socket.
    withSocket :: AddrInfo -> (Socket -> M a) -> M a
    withSocket addr = bracketM (openSocket addr) (io . sClose)
    
    -- |'openSocket' opens a new 'Socket' using the parameters specified in the
    -- given 'AddrInfo'.
    openSocket :: AddrInfo -> M Socket
    openSocket addr = do
       sock <- io $ socket (addrFamily addr) (addrSocketType addr) (addrProtocol addr)
       io $ bindSocket sock (addrAddress addr)
       name <- io $ getSocketName sock
       debug $ "Listening on " ++ show name
       return sock
    
    example = do
      addrs <- io (getAddrInfo (Just defaultHints { addrSocketType = Datagrapm} ) host (port <|> Just default_service_name))
      for_ addrs $ \ addr -> withSocket addr $ \ sock ->
        return () -- do stuff with the socket here, synchronize with other threads
                  -- via Control.Concurrent.*
  :END:
 

* TODO [#A] Remaining heist items
  - [X] onLoad/pre/post hooks for template processing

  - [X] implement <static> tag

  - [ ] implement <cache> tag


* TODO [#A] Finish HTTP server test suite


* TODO [#B] Better benchmarks
  :LOGBOOK:
  - Note taken on [2010-04-13 Tue 02:50] \\
    Ways to make the benchmarks better:
    
     - fine-grained microbenchmarks w/ criterion
    
     - track benchmark progress over time (using Hudson or the 'progression'
       package)
    
     - more sophistication than just "PONG"
    
       - test performance for larger streams with/without compression, etc
  :END:


------------------------------------------------------------------------
Something went wrong with that request. Please try again.