module Network.WebSockets.Extensions
( ExtensionDescription (..)
, ExtensionDescriptions
, parseExtensionDescriptions
, NegotiateExtension
, Extension (..)
) where
import Network.WebSockets.Extensions.Description
import Network.WebSockets.Http
import Network.WebSockets.Types
type NegotiateExtension = ExtensionDescriptions -> Either String Extension
data Extension = Extension
{ extHeaders :: Headers
, extParse :: IO (Maybe Message) -> IO (IO (Maybe Message))
, extWrite :: ([Message] -> IO ()) -> IO ([Message] -> IO ())
}