sternenseemann / spacecookie

gopher library & server written in Haskell
https://sternenseemann.github.io/spacecookie/
GNU General Public License v3.0
47 stars 5 forks source link

Pass request context to handler #26

Closed sternenseemann closed 3 years ago

sternenseemann commented 3 years ago

Would break library interface unfortunately, but having something like

data GopherRequest
  = GopherRequest
  { grSelector :: ByteString
  , grAddress :: (Word16, Word16, Word16, Word16, Word16, Word16, Word16, Word16)  -- ipv6 address
  }

Could be very useful for applications which want to kind of differentiate different users.