Network.HTTP2.Server.Internal

http2-5.3.9: HTTP/2 library

Safe Haskell | None
Language | Haskell2010

Network.HTTP2.Server.Internal

Contents

- Low level

Synopsis

- newtype Request = Request InpObj
- newtype Response = Response OutObj
- data Aux = Aux {
  - auxTimeHandle :: Handle
  - auxMySockAddr :: SockAddr
  - auxPeerSockAddr :: SockAddr
  }
- data Stream
- data ServerIO a = ServerIO {
  - sioMySockAddr :: SockAddr
  - sioPeerSockAddr :: SockAddr
  - sioReadRequest :: IO (a, Request)
  - sioWriteResponse :: a -> Response -> IO ()
  }
- runIO :: ServerConfig -> Config -> (ServerIO Stream -> IO (IO ())) -> IO ()

# Documentation

newtype Request #

Request from client.

Constructors

Request InpObj |

#### Instances

Instances details

Show Request |
Instance details Defined in Network.HTTP.Semantics.Server.Internal Methods showsPrec :: Int -> Request -> ShowS # show :: Request -> String # showList :: [Request] -> ShowS #

newtype Response #

Response from server.

Constructors

Response OutObj |

#### Instances

Instances details

Show Response |
Instance details Defined in Network.HTTP.Semantics.Server.Internal Methods showsPrec :: Int -> Response -> ShowS # show :: Response -> String # showList :: [Response] -> ShowS #

data Aux #

Additional information.

Constructors

Aux |
Fields auxTimeHandle :: Handle Time handle for the worker processing this request and response. auxMySockAddr :: SockAddr Local socket address copied from `Config`. auxPeerSockAddr :: SockAddr Remove socket address copied from `Config`.

# Low level

data Stream #

#### Instances

Instances details

Show Stream # |
Instance details Defined in Network.HTTP2.H2.Types Methods showsPrec :: Int -> Stream -> ShowS # show :: Stream -> String # showList :: [Stream] -> ShowS #

data ServerIO a #

Constructors

ServerIO |
Fields sioMySockAddr :: SockAddr sioPeerSockAddr :: SockAddr sioReadRequest :: IO (a, Request) sioWriteResponse :: a -> Response -> IO () `Response` MUST be created with `responseBuilder`. Others are not supported.

runIO :: ServerConfig -> Config -> (ServerIO Stream -> IO (IO ())) -> IO () #

Launching a receiver and a sender without workers. Any frames can be sent with `sioWriteBytes`.