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
{ :: Headers
, Extension -> IO (Maybe Message) -> IO (IO (Maybe Message))
extParse :: IO (Maybe Message) -> IO (IO (Maybe Message))
, Extension -> ([Message] -> IO ()) -> IO ([Message] -> IO ())
extWrite :: ([Message] -> IO ()) -> IO ([Message] -> IO ())
}