Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Hooks = Hooks {
- onCloseCompleted :: IO ()
- onPlainCreated :: EncryptionLevel -> Plain -> Plain
- onTransportParametersCreated :: Parameters -> Parameters
- onTLSExtensionCreated :: [ExtensionRaw] -> [ExtensionRaw]
- onTLSHandshakeCreated :: [(EncryptionLevel, CryptoData)] -> ([(EncryptionLevel, CryptoData)], Bool)
- onResetStreamReceived :: Stream -> ApplicationProtocolError -> IO ()
- onServerReady :: IO ()
- defaultHooks :: Hooks
- data ClientConfig = ClientConfig {
- ccVersion :: Version
- ccVersions :: [Version]
- ccCiphers :: [Cipher]
- ccGroups :: [Group]
- ccParameters :: Parameters
- ccKeyLog :: String -> IO ()
- ccQLog :: Maybe FilePath
- ccCredentials :: Credentials
- ccHooks :: Hooks
- ccTlsHooks :: ClientHooks
- ccUse0RTT :: Bool
- ccServerName :: HostName
- ccPortName :: ServiceName
- ccALPN :: Version -> IO (Maybe [ByteString])
- ccValidate :: Bool
- ccResumption :: ResumptionInfo
- ccPacketSize :: Maybe Int
- ccDebugLog :: Bool
- ccAutoMigration :: Bool
- defaultClientConfig :: ClientConfig
- data ServerConfig = ServerConfig {
- scVersions :: [Version]
- scCiphers :: [Cipher]
- scGroups :: [Group]
- scParameters :: Parameters
- scKeyLog :: String -> IO ()
- scQLog :: Maybe FilePath
- scCredentials :: Credentials
- scHooks :: Hooks
- scTlsHooks :: ServerHooks
- scUse0RTT :: Bool
- scAddresses :: [(IP, PortNumber)]
- scALPN :: Maybe (Version -> [ByteString] -> IO ByteString)
- scRequireRetry :: Bool
- scSessionManager :: SessionManager
- scDebugLog :: Maybe FilePath
- scTicketLifetime :: Int
- defaultServerConfig :: ServerConfig
- nextPacketNumber :: Connection -> IO PacketNumber
- setPeerPacketNumber :: Connection -> PacketNumber -> IO ()
- getPeerPacketNumber :: Connection -> IO PacketNumber
- setEncryptionLevel :: Connection -> EncryptionLevel -> IO ()
- waitEncryptionLevel :: Connection -> EncryptionLevel -> IO ()
- putOffCrypto :: Connection -> EncryptionLevel -> ReceivedPacket -> IO ()
- getCipher :: Connection -> EncryptionLevel -> IO Cipher
- setCipher :: Connection -> EncryptionLevel -> Cipher -> IO ()
- getTLSMode :: Connection -> IO HandshakeMode13
- getApplicationProtocol :: Connection -> IO (Maybe NegotiatedProtocol)
- setNegotiated :: Connection -> HandshakeMode13 -> Maybe NegotiatedProtocol -> ApplicationSecretInfo -> IO ()
- dropSecrets :: Connection -> EncryptionLevel -> IO ()
- initializeCoder :: Connection -> EncryptionLevel -> TrafficSecrets a -> IO ()
- initializeCoder1RTT :: Connection -> TrafficSecrets ApplicationSecret -> IO ()
- updateCoder1RTT :: Connection -> Bool -> IO ()
- getCoder :: Connection -> EncryptionLevel -> Bool -> IO Coder
- getProtector :: Connection -> EncryptionLevel -> IO Protector
- getCurrentKeyPhase :: Connection -> IO (Bool, PacketNumber)
- setCurrentKeyPhase :: Connection -> Bool -> PacketNumber -> IO ()
- getMyCID :: Connection -> IO CID
- getMyCIDs :: Connection -> IO [CID]
- getPeerCID :: Connection -> IO CID
- isMyCID :: Connection -> CID -> IO Bool
- myCIDsInclude :: Connection -> CID -> IO (Maybe Int)
- shouldUpdateMyCID :: Connection -> Int -> IO Bool
- shouldUpdatePeerCID :: Connection -> IO Bool
- resetPeerCID :: Connection -> CID -> IO ()
- getNewMyCID :: Connection -> IO CIDInfo
- getMyCIDSeqNum :: Connection -> IO Int
- setMyCID :: Connection -> CID -> IO ()
- setPeerCIDAndRetireCIDs :: Connection -> Int -> IO [Int]
- retirePeerCID :: Connection -> Int -> IO ()
- retireMyCID :: Connection -> Int -> IO (Maybe CIDInfo)
- addPeerCID :: Connection -> CIDInfo -> IO Bool
- waitPeerCID :: Connection -> IO CIDInfo
- choosePeerCIDForPrivacy :: Connection -> IO ()
- setPeerStatelessResetToken :: Connection -> StatelessResetToken -> IO ()
- isStatelessRestTokenValid :: Connection -> CID -> StatelessResetToken -> IO Bool
- setMigrationStarted :: Connection -> IO ()
- isPathValidating :: Connection -> IO Bool
- checkResponse :: Connection -> PathData -> IO ()
- validatePath :: Connection -> Maybe CIDInfo -> IO ()
- setVersionInfo :: Connection -> VersionInfo -> IO ()
- getVersionInfo :: Connection -> IO VersionInfo
- setVersion :: Connection -> Version -> IO ()
- getVersion :: Connection -> IO Version
- getOriginalVersion :: Connection -> Version
- getSocket :: Connection -> IO UDPSocket
- setSocket :: Connection -> UDPSocket -> IO UDPSocket
- clearSocket :: Connection -> IO UDPSocket
- getPeerAuthCIDs :: Connection -> IO AuthCIDs
- setPeerAuthCIDs :: Connection -> (AuthCIDs -> AuthCIDs) -> IO ()
- getClientDstCID :: Connection -> IO CID
- getMyParameters :: Connection -> Parameters
- getPeerParameters :: Connection -> IO Parameters
- setPeerParameters :: Connection -> Parameters -> IO ()
- delayedAck :: Connection -> IO ()
- resetDealyedAck :: Connection -> IO ()
- setMaxPacketSize :: Connection -> Int -> IO ()
- addReader :: Connection -> ThreadId -> IO ()
- killReaders :: Connection -> IO ()
- addResource :: Connection -> IO () -> IO ()
- freeResources :: Connection -> IO ()
- readMinIdleTimeout :: Connection -> IO Microseconds
- setMinIdleTimeout :: Connection -> Microseconds -> IO ()
- sendFrames :: Connection -> EncryptionLevel -> [Frame] -> IO ()
- sendFramesLim :: Connection -> EncryptionLevel -> [Frame] -> IO ()
- closeConnection :: TransportError -> ReasonPhrase -> IO ()
- abortConnection :: Connection -> ApplicationProtocolError -> ReasonPhrase -> IO ()
- setConnection0RTTReady :: Connection -> IO ()
- isConnection1RTTReady :: Connection -> IO Bool
- setConnection1RTTReady :: Connection -> IO ()
- isConnectionEstablished :: Connector a => a -> IO Bool
- setConnectionEstablished :: Connection -> IO ()
- wait0RTTReady :: Connection -> IO ()
- wait1RTTReady :: Connection -> IO ()
- waitEstablished :: Connection -> IO ()
- readConnectionFlowTx :: Connection -> STM TxFlow
- addTxData :: Connection -> Int -> STM ()
- setTxMaxData :: Connection -> Int -> IO ()
- getRxMaxData :: Connection -> IO Int
- updateFlowRx :: Connection -> Int -> IO (Maybe Int)
- checkRxMaxData :: Connection -> Int -> IO Bool
- addTxBytes :: Connection -> Int -> IO ()
- getTxBytes :: Connection -> IO Int
- addRxBytes :: Connection -> Int -> IO ()
- getRxBytes :: Connection -> IO Int
- setAddressValidated :: Connection -> IO ()
- waitAntiAmplificationFree :: Connection -> Int -> IO ()
- checkAntiAmplificationFree :: Connection -> Int -> IO Bool
- getMyStreamId :: Connection -> IO Int
- possibleMyStreams :: Connection -> IO Int
- waitMyNewStreamId :: Connection -> IO StreamId
- waitMyNewUniStreamId :: Connection -> IO StreamId
- setTxMaxStreams :: Connection -> Int -> IO ()
- setTxUniMaxStreams :: Connection -> Int -> IO ()
- checkRxMaxStreams :: Connection -> StreamId -> IO Bool
- updatePeerStreamId :: Connection -> StreamId -> IO ()
- checkStreamIdRoom :: Connection -> Direction -> IO (Maybe Int)
- createStream :: Connection -> StreamId -> IO Stream
- findStream :: Connection -> StreamId -> IO (Maybe Stream)
- addStream :: Connection -> StreamId -> IO Stream
- delStream :: Connection -> Stream -> IO ()
- initialRxMaxStreamData :: Connection -> StreamId -> Int
- setupCryptoStreams :: Connection -> IO ()
- clearCryptoStream :: Connection -> EncryptionLevel -> IO ()
- getCryptoStream :: Connection -> EncryptionLevel -> IO (Maybe Stream)
- takeInput :: Connection -> IO Input
- putInput :: Connection -> Input -> IO ()
- takeCrypto :: Connection -> IO Crypto
- putCrypto :: Connection -> Crypto -> IO ()
- takeOutputSTM :: Connection -> STM Output
- tryTakeOutput :: Connection -> IO (Maybe Output)
- tryPeekOutput :: Connection -> IO (Maybe Output)
- putOutput :: Connection -> Output -> IO ()
- outputLimit :: Int
- putOutputLim :: Connection -> Output -> IO ()
- takeOutput1STM :: Connection -> STM Output
- takeSendStreamQ :: Connection -> IO TxStreamData
- takeSendStreamQSTM :: Connection -> STM TxStreamData
- tryPeekSendStreamQ :: Connection -> IO (Maybe TxStreamData)
- putSendStreamQ :: Connection -> TxStreamData -> IO ()
- readMigrationQ :: Connection -> IO ReceivedPacket
- writeMigrationQ :: Connection -> ReceivedPacket -> IO ()
- setToken :: Connection -> Token -> IO ()
- getToken :: Connection -> IO Token
- getResumptionInfo :: Connection -> IO ResumptionInfo
- setRetried :: Connection -> Bool -> IO ()
- getRetried :: Connection -> IO Bool
- setIncompatibleVN :: Connection -> Bool -> IO ()
- getIncompatibleVN :: Connection -> IO Bool
- setResumptionSession :: Connection -> SessionEstablish
- setNewToken :: Connection -> Token -> IO ()
- setRegister :: Connection -> (CID -> Connection -> IO ()) -> (CID -> IO ()) -> IO ()
- getRegister :: Connection -> IO (CID -> Connection -> IO ())
- getUnregister :: Connection -> IO (CID -> IO ())
- setTokenManager :: Connection -> TokenManager -> IO ()
- getTokenManager :: Connection -> IO TokenManager
- setBaseThreadId :: Connection -> ThreadId -> IO ()
- getBaseThreadId :: Connection -> IO ThreadId
- setCertificateChain :: Connection -> Maybe CertificateChain -> IO ()
- getCertificateChain :: Connection -> IO (Maybe CertificateChain)
- timeout :: Microseconds -> String -> IO a -> IO (Maybe a)
- fire :: Connection -> Microseconds -> TimeoutCallback -> IO ()
- cfire :: Connection -> Microseconds -> TimeoutCallback -> IO (IO ())
- delay :: Microseconds -> IO ()
- dummySecrets :: TrafficSecrets a
- data RoleInfo
- = ClientInfo { }
- | ServerInfo {
- tokenManager :: ~TokenManager
- registerCID :: CID -> Connection -> IO ()
- unregisterCID :: CID -> IO ()
- askRetry :: Bool
- baseThreadId :: ~ThreadId
- certChain :: Maybe CertificateChain
- defaultClientRoleInfo :: RoleInfo
- defaultServerRoleInfo :: RoleInfo
- data CIDDB = CIDDB {
- usedCIDInfo :: CIDInfo
- cidInfos :: IntMap CIDInfo
- revInfos :: Map CID Int
- nextSeqNum :: Int
- triggeredByMe :: Bool
- newCIDDB :: CID -> CIDDB
- data MigrationState
- data Coder = Coder {
- encrypt :: Buffer -> PlainText -> AssDat -> PacketNumber -> IO Int
- decrypt :: Buffer -> CipherText -> AssDat -> PacketNumber -> IO Int
- supplement :: Maybe Supplement
- initialCoder :: Coder
- data Coder1RTT = Coder1RTT {}
- initialCoder1RTT :: Coder1RTT
- data Protector = Protector {}
- initialProtector :: Protector
- data Negotiated = Negotiated {}
- initialNegotiated :: Negotiated
- newtype StreamIdBase = StreamIdBase {}
- data Concurrency = Concurrency {}
- newConcurrency :: Role -> Direction -> Int -> Concurrency
- type Send = Buffer -> Int -> IO ()
- type Recv = IO ReceivedPacket
- data Connection = Connection {
- connState :: ConnState
- connDebugLog :: DebugLogger
- connQLog :: QLogger
- connHooks :: Hooks
- connSend :: ~Send
- connRecv :: ~Recv
- connRecvQ :: RecvQ
- udpSocket :: ~(IORef UDPSocket)
- readers :: IORef (IO ())
- mainThreadId :: ThreadId
- controlRate :: Rate
- roleInfo :: IORef RoleInfo
- quicVersionInfo :: IORef VersionInfo
- origVersionInfo :: VersionInfo
- myParameters :: Parameters
- myCIDDB :: IORef CIDDB
- peerParameters :: IORef Parameters
- peerCIDDB :: TVar CIDDB
- inputQ :: InputQ
- cryptoQ :: CryptoQ
- outputQ :: OutputQ
- outputQLim :: OutputQLim
- migrationQ :: MigrationQ
- shared :: Shared
- delayedAckCount :: IORef Int
- delayedAckCancel :: IORef (IO ())
- peerPacketNumber :: IORef PacketNumber
- streamTable :: IORef StreamTable
- myStreamId :: TVar Concurrency
- myUniStreamId :: TVar Concurrency
- peerStreamId :: IORef Concurrency
- peerUniStreamId :: IORef Concurrency
- flowTx :: TVar TxFlow
- flowRx :: IORef RxFlow
- migrationState :: TVar MigrationState
- minIdleTimeout :: IORef Microseconds
- bytesTx :: TVar Int
- bytesRx :: TVar Int
- addressValidated :: TVar Bool
- pendingQ :: Array EncryptionLevel (TVar [ReceivedPacket])
- ciphers :: IOArray EncryptionLevel Cipher
- coders :: IOArray EncryptionLevel Coder
- coders1RTT :: IOArray Bool Coder1RTT
- protectors :: IOArray EncryptionLevel Protector
- currentKeyPhase :: IORef (Bool, PacketNumber)
- negotiated :: IORef Negotiated
- connMyAuthCIDs :: IORef AuthCIDs
- connPeerAuthCIDs :: IORef AuthCIDs
- connResources :: IORef (IO ())
- encodeBuf :: Buffer
- encryptRes :: SizedBuffer
- decryptBuf :: Buffer
- connLDCC :: LDCC
- setDead :: Connection -> IO ()
- makePendingQ :: IO (Array EncryptionLevel (TVar [ReceivedPacket]))
- newConnection :: Role -> Parameters -> VersionInfo -> AuthCIDs -> AuthCIDs -> DebugLogger -> QLogger -> Hooks -> IORef UDPSocket -> RecvQ -> Send -> Recv -> IO Connection
- defaultTrafficSecrets :: (ClientTrafficSecret a, ServerTrafficSecret a)
- clientConnection :: ClientConfig -> VersionInfo -> AuthCIDs -> AuthCIDs -> DebugLogger -> QLogger -> Hooks -> IORef UDPSocket -> RecvQ -> Send -> Recv -> IO Connection
- serverConnection :: ServerConfig -> VersionInfo -> AuthCIDs -> AuthCIDs -> DebugLogger -> QLogger -> Hooks -> IORef UDPSocket -> RecvQ -> Send -> Recv -> IO Connection
- newtype Input = InpStream Stream
- data Crypto = InpHandshake EncryptionLevel ByteString
- data Output
- = OutControl EncryptionLevel [Frame] (IO ())
- | OutHandshake [(EncryptionLevel, ByteString)]
- | OutRetrans PlainPacket
- type InputQ = TQueue Input
- type CryptoQ = TQueue Crypto
- type OutputQ = TQueue Output
- type OutputQLim = TBQueue Output
- type MigrationQ = TQueue ReceivedPacket
- type SendStreamQ = TQueue TxStreamData
- data Shared = Shared {}
- newShared :: IO Shared
- class Connector a where
- getRole :: a -> Role
- getEncryptionLevel :: a -> IO EncryptionLevel
- getMaxPacketSize :: a -> IO Int
- getConnectionState :: a -> IO ConnectionState
- getPacketNumber :: a -> IO PacketNumber
- getAlive :: a -> IO Bool
- data ConnState = ConnState {}
- newConnState :: Role -> IO ConnState
- data Role
- isClient :: Connector a => a -> Bool
- isServer :: Connector a => a -> Bool
- data ConnectionState
- isConnectionEstablished :: Connector a => a -> IO Bool
- data FusionContext
- fusionNewContext :: IO FusionContext
- fusionSetup :: Cipher -> FusionContext -> Key -> IV -> IO ()
- fusionEncrypt :: FusionContext -> Supplement -> Buffer -> PlainText -> AssDat -> PacketNumber -> IO Int
- fusionDecrypt :: FusionContext -> Buffer -> CipherText -> AssDat -> PacketNumber -> IO Int
- data Supplement
- fusionSetupSupplement :: Cipher -> Key -> IO Supplement
- fusionSetSample :: Supplement -> Buffer -> IO ()
- fusionGetMask :: Supplement -> IO Buffer
- isFusionAvailable :: IO Bool
- niteEncrypt :: Cipher -> Key -> IV -> PlainText -> AssDat -> PacketNumber -> Maybe (CipherText, CipherText)
- niteEncrypt' :: Cipher -> Key -> Nonce -> PlainText -> AssDat -> Maybe (CipherText, CipherText)
- niteDecrypt :: Cipher -> Key -> IV -> CipherText -> AssDat -> PacketNumber -> Maybe PlainText
- niteDecrypt' :: Cipher -> Key -> Nonce -> CipherText -> AssDat -> Maybe PlainText
- protectionMask :: Cipher -> Key -> Sample -> Mask
- aes128gcmEncrypt :: Key -> Nonce -> PlainText -> AssDat -> Maybe (CipherText, CipherText)
- makeNonce :: IV -> ByteString -> Nonce
- makeNiteEncrypt :: Cipher -> Key -> IV -> NiteEncrypt
- makeNiteDecrypt :: Cipher -> Key -> IV -> NiteDecrypt
- makeNiteProtector :: Cipher -> Key -> IO (Buffer -> IO (), IO Buffer)
- type PlainText = ByteString
- type CipherText = ByteString
- newtype Key = Key ByteString
- newtype IV = IV ByteString
- data CID
- newtype Secret = Secret ByteString
- newtype AssDat = AssDat ByteString
- newtype Sample = Sample ByteString
- newtype Mask = Mask ByteString
- newtype Nonce = Nonce ByteString
- type Salt = ByteString
- newtype Label = Label ByteString
- data Cipher
- data InitialSecret
- type TrafficSecrets a = (ClientTrafficSecret a, ServerTrafficSecret a)
- newtype ClientTrafficSecret a = ClientTrafficSecret ByteString
- newtype ServerTrafficSecret a = ServerTrafficSecret ByteString
- defaultCipher :: Cipher
- initialSecrets :: Version -> CID -> TrafficSecrets InitialSecret
- clientInitialSecret :: Version -> CID -> ClientTrafficSecret InitialSecret
- serverInitialSecret :: Version -> CID -> ServerTrafficSecret InitialSecret
- aeadKey :: Version -> Cipher -> Secret -> Key
- initialVector :: Version -> Cipher -> Secret -> IV
- nextSecret :: Version -> Cipher -> Secret -> Secret
- headerProtectionKey :: Version -> Cipher -> Secret -> Key
- tagLength :: Cipher -> Int
- sampleLength :: Cipher -> Int
- bsXOR :: ByteString -> ByteString -> ByteString
- calculateIntegrityTag :: Version -> CID -> ByteString -> ByteString
- data Builder
- type DebugLogger = Builder -> IO ()
- bhow :: Show a => a -> Builder
- stdoutLogger :: DebugLogger
- dirDebugLogger :: Maybe FilePath -> CID -> IO (DebugLogger, IO ())
- encodeVersionNegotiationPacket :: VersionNegotiationPacket -> IO ByteString
- encodeRetryPacket :: RetryPacket -> IO ByteString
- encodePlainPacket :: Connection -> SizedBuffer -> PlainPacket -> Maybe Int -> IO (Int, Int)
- decodePacket :: ByteString -> IO (PacketI, ByteString)
- decodePackets :: ByteString -> IO [PacketI]
- decodeCryptPackets :: ByteString -> IO [(CryptPacket, EncryptionLevel, Int)]
- decryptCrypt :: Connection -> Crypt -> EncryptionLevel -> IO (Maybe Plain)
- decodeStatelessResetToken :: ByteString -> Maybe StatelessResetToken
- encodeFrames :: [Frame] -> IO ByteString
- decodeFramesBuffer :: Buffer -> BufferSize -> IO (Maybe [Frame])
- decodeFramesBS :: ByteString -> IO (Maybe [Frame])
- countZero :: Ptr Word8 -> Ptr Word8 -> IO Int
- isLong :: Word8 -> Bool
- isShort :: Flags Protected -> Bool
- protectFlags :: Flags Raw -> Word8 -> Flags Protected
- unprotectFlags :: Flags Protected -> Word8 -> Flags Raw
- encodeLongHeaderFlags :: Version -> LongHeaderPacketType -> Flags Raw -> Flags Raw -> Bool -> IO (Flags Raw)
- encodeShortHeaderFlags :: Flags Raw -> Flags Raw -> Bool -> Bool -> IO (Flags Raw)
- decodeLongHeaderPacketType :: Version -> Flags Protected -> LongHeaderPacketType
- encodePktNumLength :: Int -> Flags Raw
- decodePktNumLength :: Flags Raw -> Int
- versionNegotiationPacketType :: IO (Flags Raw)
- retryPacketType :: Version -> IO (Flags Raw)
- data CryptoToken = CryptoToken {}
- isRetryToken :: CryptoToken -> Bool
- generateToken :: Version -> Int -> IO CryptoToken
- generateRetryToken :: Version -> Int -> CID -> CID -> CID -> IO CryptoToken
- encryptToken :: TokenManager -> CryptoToken -> IO Token
- decryptToken :: TokenManager -> Token -> IO (Maybe CryptoToken)
- data Parameters = Parameters {
- originalDestinationConnectionId :: Maybe CID
- maxIdleTimeout :: Milliseconds
- statelessResetToken :: Maybe StatelessResetToken
- maxUdpPayloadSize :: Int
- initialMaxData :: Int
- initialMaxStreamDataBidiLocal :: Int
- initialMaxStreamDataBidiRemote :: Int
- initialMaxStreamDataUni :: Int
- initialMaxStreamsBidi :: Int
- initialMaxStreamsUni :: Int
- ackDelayExponent :: Int
- maxAckDelay :: Milliseconds
- disableActiveMigration :: Bool
- preferredAddress :: Maybe ByteString
- activeConnectionIdLimit :: Int
- initialSourceConnectionId :: Maybe CID
- retrySourceConnectionId :: Maybe CID
- grease :: Maybe ByteString
- greaseQuicBit :: Bool
- versionInformation :: Maybe VersionInfo
- defaultParameters :: Parameters
- baseParameters :: Parameters
- encodeParameters :: Parameters -> ByteString
- decodeParameters :: ByteString -> Maybe Parameters
- data AuthCIDs = AuthCIDs {
- initSrcCID :: Maybe CID
- origDstCID :: Maybe CID
- retrySrcCID :: Maybe CID
- defaultAuthCIDs :: AuthCIDs
- setCIDsToParameters :: AuthCIDs -> Parameters -> Parameters
- getCIDsToParameters :: Parameters -> AuthCIDs
- type QLogger = QlogMsg -> IO ()
- newQlogger :: TimeMicrosecond -> ByteString -> CID -> FastLogger -> IO QLogger
- class Qlog a where
- class KeepQlog a where
- data QlogMsg
- = QRecvInitial
- | QSentRetry
- | QSent LogStr TimeMicrosecond
- | QReceived LogStr TimeMicrosecond
- | QDropped LogStr TimeMicrosecond
- | QMetricsUpdated LogStr TimeMicrosecond
- | QPacketLost LogStr TimeMicrosecond
- | QCongestionStateUpdated LogStr TimeMicrosecond
- | QLossTimerUpdated LogStr TimeMicrosecond
- | QDebug LogStr TimeMicrosecond
- | QParamsSet LogStr TimeMicrosecond
- | QCIDUpdate LogStr TimeMicrosecond
- qlogReceived :: (KeepQlog q, Qlog a) => q -> a -> TimeMicrosecond -> IO ()
- qlogDropped :: (KeepQlog q, Qlog a) => q -> a -> IO ()
- qlogRecvInitial :: KeepQlog q => q -> IO ()
- qlogSentRetry :: KeepQlog q => q -> IO ()
- qlogParamsSet :: KeepQlog q => q -> (Parameters, String) -> IO ()
- qlogDebug :: KeepQlog q => q -> Debug -> IO ()
- qlogCIDUpdate :: KeepQlog q => q -> LR -> IO ()
- newtype Debug = Debug LogStr
- data LR
- packetType :: Header -> LogStr
- sw :: Show a => a -> LogStr
- data Stream
- streamId :: Stream -> StreamId
- streamConnection :: Stream -> Connection
- newStream :: Connection -> Int -> Int -> StreamId -> IO Stream
- data TxStreamData = TxStreamData Stream [StreamData] Length Fin
- data StreamState = StreamState {
- streamOffset :: Offset
- streamFin :: Fin
- data RecvStreamQ = RecvStreamQ {}
- data RxStreamData = RxStreamData {
- rxstrmData :: StreamData
- rxstrmOff :: Offset
- rxstrmLen :: Length
- rxstrmFin :: Fin
- type Length = Int
- syncFinTx :: Stream -> IO ()
- waitFinTx :: Stream -> IO ()
- getTxStreamOffset :: Stream -> Int -> IO Offset
- isTxStreamClosed :: Stream -> IO Bool
- setTxStreamClosed :: Stream -> IO ()
- getRxStreamOffset :: Stream -> Int -> IO Offset
- isRxStreamClosed :: Stream -> IO Bool
- setRxStreamClosed :: Stream -> IO ()
- readStreamFlowTx :: Stream -> STM TxFlow
- addTxStreamData :: Stream -> Int -> STM ()
- setTxMaxStreamData :: Stream -> Int -> IO ()
- getRxMaxStreamData :: Stream -> IO Int
- updateStreamFlowRx :: Stream -> Int -> IO (Maybe Int)
- takeRecvStreamQwithSize :: Stream -> Int -> IO ByteString
- putRxStreamData :: Stream -> RxStreamData -> IO FlowCntl
- data FlowCntl
- tryReassemble :: Stream -> RxStreamData -> (StreamData -> IO ()) -> IO () -> IO Bool
- data StreamTable
- emptyStreamTable :: StreamTable
- lookupStream :: StreamId -> StreamTable -> Maybe Stream
- insertStream :: StreamId -> Stream -> StreamTable -> StreamTable
- deleteStream :: StreamId -> StreamTable -> StreamTable
- insertCryptoStreams :: Connection -> StreamTable -> IO StreamTable
- deleteCryptoStream :: EncryptionLevel -> StreamTable -> StreamTable
- lookupCryptoStream :: EncryptionLevel -> StreamTable -> Maybe Stream
- clientHandshaker :: QUICCallbacks -> ClientConfig -> Version -> AuthCIDs -> SessionEstablish -> Bool -> IO ()
- serverHandshaker :: QUICCallbacks -> ServerConfig -> Version -> IO Parameters -> IO ()
- type Bytes = ShortByteString
- type Close = IO ()
- data Direction
- data SizedBuffer = SizedBuffer Buffer BufferSize
- type PacketNumber = Int
- type Range = Int
- type Gap = Int
- data AckInfo = AckInfo PacketNumber Range [(Gap, Range)]
- ackInfo0 :: AckInfo
- toAckInfo :: [PacketNumber] -> AckInfo
- fromAckInfo :: AckInfo -> [PacketNumber]
- fromAckInfoWithMin :: AckInfo -> PacketNumber -> [PacketNumber]
- fromAckInfoToPred :: AckInfo -> PacketNumber -> Bool
- newtype PeerPacketNumbers = PeerPacketNumbers IntSet
- emptyPeerPacketNumbers :: PeerPacketNumbers
- newtype CID = CID Bytes
- myCIDLength :: Int
- newCID :: IO CID
- fromCID :: CID -> ByteString
- toCID :: ByteString -> CID
- makeCID :: ShortByteString -> CID
- unpackCID :: CID -> (ShortByteString, Word8)
- newtype StatelessResetToken = StatelessResetToken Bytes
- newStatelessResetToken :: IO StatelessResetToken
- newtype PathData = PathData Bytes
- newPathData :: IO PathData
- data CIDInfo = CIDInfo {}
- maximumUdpPayloadSize :: Int
- defaultQUICPacketSize :: Int
- defaultQUICPacketSizeForIPv4 :: Int
- defaultQUICPacketSizeForIPv6 :: Int
- maximumQUICHeaderSize :: Int
- idleTimeout :: Microseconds
- newtype TransportError = TransportError Int
- pattern NoError :: TransportError
- pattern InternalError :: TransportError
- pattern ConnectionRefused :: TransportError
- pattern FlowControlError :: TransportError
- pattern StreamLimitError :: TransportError
- pattern StreamStateError :: TransportError
- pattern FinalSizeError :: TransportError
- pattern FrameEncodingError :: TransportError
- pattern TransportParameterError :: TransportError
- pattern ConnectionIdLimitError :: TransportError
- pattern ProtocolViolation :: TransportError
- pattern InvalidToken :: TransportError
- pattern ApplicationError :: TransportError
- pattern CryptoBufferExceeded :: TransportError
- pattern KeyUpdateError :: TransportError
- pattern AeadLimitReached :: TransportError
- pattern NoViablePath :: TransportError
- pattern VersionNegotiationError :: TransportError
- cryptoError :: AlertDescription -> TransportError
- newtype ApplicationProtocolError = ApplicationProtocolError Int
- data QUICException
- = ConnectionIsClosed
- | TransportErrorIsReceived TransportError ReasonPhrase
- | TransportErrorIsSent TransportError ReasonPhrase
- | ApplicationProtocolErrorIsReceived ApplicationProtocolError ReasonPhrase
- | ApplicationProtocolErrorIsSent ApplicationProtocolError ReasonPhrase
- | ConnectionIsTimeout String
- | ConnectionIsReset
- | StreamIsClosed
- | HandshakeFailed AlertDescription
- | VersionIsUnknown Word32
- | NoVersionIsSpecified
- | VersionNegotiationFailed
- | BadThingHappen SomeException
- data InternalControl
- newtype NextVersion = NextVersion VersionInfo
- data Abort
- type FrameType = Int
- data Direction
- type ReasonPhrase = ShortByteString
- type SeqNum = Int
- data Frame
- = Padding Int
- | Ping
- | Ack AckInfo Delay
- | ResetStream StreamId ApplicationProtocolError Int
- | StopSending StreamId ApplicationProtocolError
- | CryptoF Offset CryptoData
- | NewToken Token
- | StreamF StreamId Offset [StreamData] Fin
- | MaxData Int
- | MaxStreamData StreamId Int
- | MaxStreams Direction Int
- | DataBlocked Int
- | StreamDataBlocked StreamId Int
- | StreamsBlocked Direction Int
- | NewConnectionID CIDInfo SeqNum
- | RetireConnectionID SeqNum
- | PathChallenge PathData
- | PathResponse PathData
- | ConnectionClose TransportError FrameType ReasonPhrase
- | ConnectionCloseApp ApplicationProtocolError ReasonPhrase
- | HandshakeDone
- | UnknownFrame Int
- type StreamId = Int
- isClientInitiatedBidirectional :: StreamId -> Bool
- isServerInitiatedBidirectional :: StreamId -> Bool
- isClientInitiatedUnidirectional :: StreamId -> Bool
- isServerInitiatedUnidirectional :: StreamId -> Bool
- isClientInitiated :: StreamId -> Bool
- isServerInitiated :: StreamId -> Bool
- isBidirectional :: StreamId -> Bool
- isUnidirectional :: StreamId -> Bool
- type Delay = Milliseconds
- type Fin = Bool
- type CryptoData = ByteString
- type StreamData = ByteString
- type Token = ByteString
- emptyToken :: Token
- ackEliciting :: Frame -> Bool
- pathValidating :: Frame -> Bool
- inFlight :: Frame -> Bool
- rateControled :: Frame -> Bool
- encodeInt :: Int64 -> ByteString
- encodeInt8 :: Int64 -> ByteString
- encodeInt' :: WriteBuffer -> Int64 -> IO ()
- encodeInt'2 :: WriteBuffer -> Int64 -> IO ()
- encodeInt'4 :: WriteBuffer -> Int64 -> IO ()
- decodeInt :: ByteString -> Int64
- decodeInt' :: ReadBuffer -> IO Int64
- newtype Version = Version Word32
- pattern Negotiation :: Version
- pattern Version1 :: Version
- pattern Version2 :: Version
- pattern Draft29 :: Version
- pattern GreasingVersion :: Version
- pattern GreasingVersion2 :: Version
- isGreasingVersion :: Version -> Bool
- data VersionInfo = VersionInfo {
- chosenVersion :: Version
- otherVersions :: [Version]
- brokenVersionInfo :: VersionInfo
- extensionIDForTtransportParameter :: Version -> ExtensionID
- data PacketI
- data PacketO
- data VersionNegotiationPacket = VersionNegotiationPacket CID CID [Version]
- data RetryPacket = RetryPacket Version CID CID Token (Either CID (ByteString, ByteString))
- data BrokenPacket = BrokenPacket
- data Header
- headerMyCID :: Header -> CID
- headerPeerCID :: Header -> CID
- data PlainPacket = PlainPacket Header Plain
- data CryptPacket = CryptPacket Header Crypt
- data Plain = Plain {
- plainFlags :: Flags Raw
- plainPacketNumber :: PacketNumber
- plainFrames :: [Frame]
- plainMarks :: Int
- defaultPlainMarks :: Int
- setIllegalReservedBits :: Int -> Int
- setUnknownFrame :: Int -> Int
- setNoFrames :: Int -> Int
- setNoPaddings :: Int -> Int
- set4bytesPN :: Int -> Int
- isIllegalReservedBits :: Int -> Bool
- isUnknownFrame :: Int -> Bool
- isNoFrames :: Int -> Bool
- isNoPaddings :: Int -> Bool
- is4bytesPN :: Int -> Bool
- data MigrationInfo = MigrationInfo ListenSocket ClientSockAddr CID
- data Crypt = Crypt {}
- isCryptDelayed :: Crypt -> Bool
- setCryptDelayed :: Crypt -> Crypt
- data StatelessReset = StatelessReset
- data ReceivedPacket = ReceivedPacket {}
- mkReceivedPacket :: CryptPacket -> TimeMicrosecond -> Int -> EncryptionLevel -> ReceivedPacket
- data LongHeaderPacketType
- data EncryptionLevel
- packetEncryptionLevel :: Header -> EncryptionLevel
- newtype Flags a = Flags Word8
- data Protected
- data Raw
- type EncodedPacketNumber = Word32
- newtype RecvQ = RecvQ (TQueue ReceivedPacket)
- newRecvQ :: IO RecvQ
- readRecvQ :: RecvQ -> IO ReceivedPacket
- writeRecvQ :: RecvQ -> ReceivedPacket -> IO ()
- prependRecvQ :: RecvQ -> ReceivedPacket -> STM ()
- type SessionEstablish = SessionID -> SessionData -> IO (Maybe Ticket)
- data ResumptionInfo = ResumptionInfo {}
- defaultResumptionInfo :: ResumptionInfo
- is0RTTPossible :: ResumptionInfo -> Bool
- isResumptionPossible :: ResumptionInfo -> Bool
- get0RTTCipher :: ResumptionInfo -> Maybe CipherID
- newtype Milliseconds = Milliseconds Int64
- newtype Microseconds = Microseconds Int
- milliToMicro :: Milliseconds -> Microseconds
- microToMilli :: Microseconds -> Milliseconds
- type TimeMicrosecond = UnixTime
- timeMicrosecond0 :: UnixTime
- getTimeMicrosecond :: IO TimeMicrosecond
- getElapsedTimeMicrosecond :: TimeMicrosecond -> IO Microseconds
- elapsedTimeMicrosecond :: UnixTime -> UnixTime -> Microseconds
- getTimeoutInMicrosecond :: TimeMicrosecond -> IO Microseconds
- getPastTimeMicrosecond :: Microseconds -> IO TimeMicrosecond
- getFutureTimeMicrosecond :: Microseconds -> IO TimeMicrosecond
- addMicroseconds :: TimeMicrosecond -> Microseconds -> TimeMicrosecond
- fromRight :: b -> Either a b -> b
- dec16 :: ByteString -> ByteString
- enc16 :: ByteString -> ByteString
- dec16s :: ShortByteString -> ShortByteString
- enc16s :: ShortByteString -> ShortByteString
- shortToString :: ShortByteString -> String
- getRandomOneByte :: IO Word8
- getRandomBytes :: Int -> IO ShortByteString
- totalLen :: [ByteString] -> Int
- sum' :: (Functor f, Foldable f) => f Int -> Int
- withByteString :: ByteString -> (Ptr Word8 -> IO a) -> IO a
- shortpack :: String -> ShortByteString
- ignore :: SomeException -> IO ()
- checkWindowOpenSTM :: LDCC -> Int -> STM ()
- takePingSTM :: LDCC -> STM EncryptionLevel
- speedup :: LDCC -> EncryptionLevel -> LogStr -> IO ()
- resender :: LDCC -> IO ()
- onPacketSent :: LDCC -> SentPacket -> IO ()
- onPacketReceived :: LDCC -> EncryptionLevel -> PacketNumber -> IO ()
- onAckReceived :: LDCC -> EncryptionLevel -> AckInfo -> Microseconds -> IO ()
- onPacketNumberSpaceDiscarded :: LDCC -> EncryptionLevel -> IO ()
- setInitialCongestionWindow :: LDCC -> Int -> IO ()
- getPreviousRTT1PPNs :: LDCC -> IO PeerPacketNumbers
- setPreviousRTT1PPNs :: LDCC -> PeerPacketNumbers -> IO ()
- getSpeedingUp :: LDCC -> IO Bool
- getPacketNumberSpaceDiscarded :: LDCC -> EncryptionLevel -> IO Bool
- getAndSetPacketNumberSpaceDiscarded :: LDCC -> EncryptionLevel -> IO Bool
- setMaxAckDaley :: LDCC -> Microseconds -> IO ()
- getPeerPacketNumbers :: LDCC -> EncryptionLevel -> IO PeerPacketNumbers
- fromPeerPacketNumbers :: PeerPacketNumbers -> [PacketNumber]
- nullPeerPacketNumbers :: PeerPacketNumbers -> Bool
- findDuration :: Seq SentPacket -> PacketNumber -> Maybe UnixDiffTime
- getPTO :: LDCC -> IO Microseconds
- releaseByRetry :: LDCC -> IO (Seq PlainPacket)
- releaseOldest :: LDCC -> EncryptionLevel -> IO (Maybe SentPacket)
- beforeAntiAmp :: LDCC -> IO ()
- ldccTimer :: LDCC -> IO ()
- data SentPacket
- spPlainPacket :: SentPacket -> PlainPacket
- spTimeSent :: SentPacket -> TimeMicrosecond
- spSentBytes :: SentPacket -> Int
- spEncryptionLevel :: SentPacket -> EncryptionLevel
- spPacketNumber :: SentPacket -> PacketNumber
- spPeerPacketNumbers :: SentPacket -> PeerPacketNumbers
- spAckEliciting :: SentPacket -> Bool
- mkSentPacket :: PacketNumber -> EncryptionLevel -> PlainPacket -> PeerPacketNumbers -> Bool -> SentPacket
- fixSentPacket :: SentPacket -> Int -> Int -> SentPacket
- data LDCC
- newLDCC :: ConnState -> QLogger -> (PlainPacket -> IO ()) -> IO LDCC
- qlogSent :: (KeepQlog q, Qlog pkt) => q -> pkt -> TimeMicrosecond -> IO ()
- data ConnectionControl
- controlConnection :: Connection -> ConnectionControl -> IO Bool
- windowsThreadBlockHack :: IO a -> IO a
Documentation
Hooks.
Hooks | |
|
defaultHooks :: Hooks Source #
Default hooks.
data ClientConfig Source #
Client configuration.
ClientConfig | |
|
defaultClientConfig :: ClientConfig Source #
The default value for client configuration.
data ServerConfig Source #
Server configuration.
ServerConfig | |
|
defaultServerConfig :: ServerConfig Source #
The default value for server configuration.
setPeerPacketNumber :: Connection -> PacketNumber -> IO () Source #
setEncryptionLevel :: Connection -> EncryptionLevel -> IO () Source #
waitEncryptionLevel :: Connection -> EncryptionLevel -> IO () Source #
putOffCrypto :: Connection -> EncryptionLevel -> ReceivedPacket -> IO () Source #
getCipher :: Connection -> EncryptionLevel -> IO Cipher Source #
setCipher :: Connection -> EncryptionLevel -> Cipher -> IO () Source #
getTLSMode :: Connection -> IO HandshakeMode13 Source #
setNegotiated :: Connection -> HandshakeMode13 -> Maybe NegotiatedProtocol -> ApplicationSecretInfo -> IO () Source #
dropSecrets :: Connection -> EncryptionLevel -> IO () Source #
initializeCoder :: Connection -> EncryptionLevel -> TrafficSecrets a -> IO () Source #
initializeCoder1RTT :: Connection -> TrafficSecrets ApplicationSecret -> IO () Source #
updateCoder1RTT :: Connection -> Bool -> IO () Source #
getCoder :: Connection -> EncryptionLevel -> Bool -> IO Coder Source #
getProtector :: Connection -> EncryptionLevel -> IO Protector Source #
getCurrentKeyPhase :: Connection -> IO (Bool, PacketNumber) Source #
setCurrentKeyPhase :: Connection -> Bool -> PacketNumber -> IO () Source #
getPeerCID :: Connection -> IO CID Source #
myCIDsInclude :: Connection -> CID -> IO (Maybe Int) Source #
shouldUpdateMyCID :: Connection -> Int -> IO Bool Source #
shouldUpdatePeerCID :: Connection -> IO Bool Source #
resetPeerCID :: Connection -> CID -> IO () Source #
Reseting to Initial CID in the client side.
getNewMyCID :: Connection -> IO CIDInfo Source #
Sending NewConnectionID
getMyCIDSeqNum :: Connection -> IO Int Source #
setPeerCIDAndRetireCIDs :: Connection -> Int -> IO [Int] Source #
Receiving NewConnectionID
retirePeerCID :: Connection -> Int -> IO () Source #
After sending RetireConnectionID
retireMyCID :: Connection -> Int -> IO (Maybe CIDInfo) Source #
Receiving RetireConnectionID
addPeerCID :: Connection -> CIDInfo -> IO Bool Source #
Receiving NewConnectionID
waitPeerCID :: Connection -> IO CIDInfo Source #
Only for the internal "migration" API
choosePeerCIDForPrivacy :: Connection -> IO () Source #
Automatic CID update
setPeerStatelessResetToken :: Connection -> StatelessResetToken -> IO () Source #
isStatelessRestTokenValid :: Connection -> CID -> StatelessResetToken -> IO Bool Source #
setMigrationStarted :: Connection -> IO () Source #
isPathValidating :: Connection -> IO Bool Source #
checkResponse :: Connection -> PathData -> IO () Source #
validatePath :: Connection -> Maybe CIDInfo -> IO () Source #
setVersionInfo :: Connection -> VersionInfo -> IO () Source #
getVersionInfo :: Connection -> IO VersionInfo Source #
setVersion :: Connection -> Version -> IO () Source #
getVersion :: Connection -> IO Version Source #
clearSocket :: Connection -> IO UDPSocket Source #
getPeerAuthCIDs :: Connection -> IO AuthCIDs Source #
setPeerAuthCIDs :: Connection -> (AuthCIDs -> AuthCIDs) -> IO () Source #
getClientDstCID :: Connection -> IO CID Source #
setPeerParameters :: Connection -> Parameters -> IO () Source #
delayedAck :: Connection -> IO () Source #
resetDealyedAck :: Connection -> IO () Source #
setMaxPacketSize :: Connection -> Int -> IO () Source #
killReaders :: Connection -> IO () Source #
addResource :: Connection -> IO () -> IO () Source #
freeResources :: Connection -> IO () Source #
setMinIdleTimeout :: Connection -> Microseconds -> IO () Source #
sendFrames :: Connection -> EncryptionLevel -> [Frame] -> IO () Source #
sendFramesLim :: Connection -> EncryptionLevel -> [Frame] -> IO () Source #
closeConnection :: TransportError -> ReasonPhrase -> IO () Source #
Closing a connection with/without a transport error. Internal threads should use this.
abortConnection :: Connection -> ApplicationProtocolError -> ReasonPhrase -> IO () Source #
Closing a connection with an application protocol error.
setConnection0RTTReady :: Connection -> IO () Source #
isConnection1RTTReady :: Connection -> IO Bool Source #
setConnection1RTTReady :: Connection -> IO () Source #
setConnectionEstablished :: Connection -> IO () Source #
wait0RTTReady :: Connection -> IO () Source #
Waiting until 0-RTT data can be sent.
wait1RTTReady :: Connection -> IO () Source #
Waiting until 1-RTT data can be sent.
waitEstablished :: Connection -> IO () Source #
For clients, waiting until HANDSHAKE_DONE is received. For servers, waiting until a TLS stack reports that the handshake is complete.
setTxMaxData :: Connection -> Int -> IO () Source #
getRxMaxData :: Connection -> IO Int Source #
updateFlowRx :: Connection -> Int -> IO (Maybe Int) Source #
checkRxMaxData :: Connection -> Int -> IO Bool Source #
addTxBytes :: Connection -> Int -> IO () Source #
getTxBytes :: Connection -> IO Int Source #
addRxBytes :: Connection -> Int -> IO () Source #
getRxBytes :: Connection -> IO Int Source #
setAddressValidated :: Connection -> IO () Source #
waitAntiAmplificationFree :: Connection -> Int -> IO () Source #
checkAntiAmplificationFree :: Connection -> Int -> IO Bool Source #
getMyStreamId :: Connection -> IO Int Source #
possibleMyStreams :: Connection -> IO Int Source #
waitMyNewStreamId :: Connection -> IO StreamId Source #
setTxMaxStreams :: Connection -> Int -> IO () Source #
setTxUniMaxStreams :: Connection -> Int -> IO () Source #
checkRxMaxStreams :: Connection -> StreamId -> IO Bool Source #
updatePeerStreamId :: Connection -> StreamId -> IO () Source #
checkStreamIdRoom :: Connection -> Direction -> IO (Maybe Int) Source #
createStream :: Connection -> StreamId -> IO Stream Source #
findStream :: Connection -> StreamId -> IO (Maybe Stream) Source #
initialRxMaxStreamData :: Connection -> StreamId -> Int Source #
setupCryptoStreams :: Connection -> IO () Source #
clearCryptoStream :: Connection -> EncryptionLevel -> IO () Source #
getCryptoStream :: Connection -> EncryptionLevel -> IO (Maybe Stream) Source #
takeCrypto :: Connection -> IO Crypto Source #
takeOutputSTM :: Connection -> STM Output Source #
tryTakeOutput :: Connection -> IO (Maybe Output) Source #
tryPeekOutput :: Connection -> IO (Maybe Output) Source #
outputLimit :: Int Source #
putOutputLim :: Connection -> Output -> IO () Source #
takeOutput1STM :: Connection -> STM Output Source #
tryPeekSendStreamQ :: Connection -> IO (Maybe TxStreamData) Source #
putSendStreamQ :: Connection -> TxStreamData -> IO () Source #
writeMigrationQ :: Connection -> ReceivedPacket -> IO () Source #
getResumptionInfo :: Connection -> IO ResumptionInfo Source #
Getting information about resumption.
setRetried :: Connection -> Bool -> IO () Source #
getRetried :: Connection -> IO Bool Source #
setIncompatibleVN :: Connection -> Bool -> IO () Source #
getIncompatibleVN :: Connection -> IO Bool Source #
setNewToken :: Connection -> Token -> IO () Source #
setRegister :: Connection -> (CID -> Connection -> IO ()) -> (CID -> IO ()) -> IO () Source #
getRegister :: Connection -> IO (CID -> Connection -> IO ()) Source #
getUnregister :: Connection -> IO (CID -> IO ()) Source #
setTokenManager :: Connection -> TokenManager -> IO () Source #
setBaseThreadId :: Connection -> ThreadId -> IO () Source #
getBaseThreadId :: Connection -> IO ThreadId Source #
setCertificateChain :: Connection -> Maybe CertificateChain -> IO () Source #
fire :: Connection -> Microseconds -> TimeoutCallback -> IO () Source #
cfire :: Connection -> Microseconds -> TimeoutCallback -> IO (IO ()) Source #
delay :: Microseconds -> IO () Source #
ClientInfo | |
ServerInfo | |
|
CIDDB | |
|
data MigrationState Source #
Instances
Show MigrationState Source # | |
Defined in Network.QUIC.Connection.Types showsPrec :: Int -> MigrationState -> ShowS # show :: MigrationState -> String # showList :: [MigrationState] -> ShowS # | |
Eq MigrationState Source # | |
Defined in Network.QUIC.Connection.Types (==) :: MigrationState -> MigrationState -> Bool # (/=) :: MigrationState -> MigrationState -> Bool # |
Coder | |
|
initialCoder :: Coder Source #
data Negotiated Source #
newtype StreamIdBase Source #
Instances
Show StreamIdBase Source # | |
Defined in Network.QUIC.Connection.Types showsPrec :: Int -> StreamIdBase -> ShowS # show :: StreamIdBase -> String # showList :: [StreamIdBase] -> ShowS # | |
Eq StreamIdBase Source # | |
Defined in Network.QUIC.Connection.Types (==) :: StreamIdBase -> StreamIdBase -> Bool # (/=) :: StreamIdBase -> StreamIdBase -> Bool # |
data Concurrency Source #
Instances
Show Concurrency Source # | |
Defined in Network.QUIC.Connection.Types showsPrec :: Int -> Concurrency -> ShowS # show :: Concurrency -> String # showList :: [Concurrency] -> ShowS # |
newConcurrency :: Role -> Direction -> Int -> Concurrency Source #
type Recv = IO ReceivedPacket Source #
data Connection Source #
A quic connection to carry multiple streams.
Instances
Connector Connection Source # | |
Defined in Network.QUIC.Connection.Types getRole :: Connection -> Role Source # getEncryptionLevel :: Connection -> IO EncryptionLevel Source # getMaxPacketSize :: Connection -> IO Int Source # getConnectionState :: Connection -> IO ConnectionState Source # | |
KeepQlog Connection Source # | |
Defined in Network.QUIC.Connection.Types keepQlog :: Connection -> QLogger Source # |
setDead :: Connection -> IO () Source #
makePendingQ :: IO (Array EncryptionLevel (TVar [ReceivedPacket])) Source #
newConnection :: Role -> Parameters -> VersionInfo -> AuthCIDs -> AuthCIDs -> DebugLogger -> QLogger -> Hooks -> IORef UDPSocket -> RecvQ -> Send -> Recv -> IO Connection Source #
clientConnection :: ClientConfig -> VersionInfo -> AuthCIDs -> AuthCIDs -> DebugLogger -> QLogger -> Hooks -> IORef UDPSocket -> RecvQ -> Send -> Recv -> IO Connection Source #
serverConnection :: ServerConfig -> VersionInfo -> AuthCIDs -> AuthCIDs -> DebugLogger -> QLogger -> Hooks -> IORef UDPSocket -> RecvQ -> Send -> Recv -> IO Connection Source #
type OutputQLim = TBQueue Output Source #
type MigrationQ = TQueue ReceivedPacket Source #
type SendStreamQ = TQueue TxStreamData Source #
class Connector a where Source #
getEncryptionLevel :: a -> IO EncryptionLevel Source #
getMaxPacketSize :: a -> IO Int Source #
getConnectionState :: a -> IO ConnectionState Source #
getPacketNumber :: a -> IO PacketNumber Source #
Instances
Connector Connection Source # | |
Defined in Network.QUIC.Connection.Types getRole :: Connection -> Role Source # getEncryptionLevel :: Connection -> IO EncryptionLevel Source # getMaxPacketSize :: Connection -> IO Int Source # getConnectionState :: Connection -> IO ConnectionState Source # | |
Connector LDCC Source # | |
Defined in Network.QUIC.Recovery.Types getRole :: LDCC -> Role Source # getEncryptionLevel :: LDCC -> IO EncryptionLevel Source # getMaxPacketSize :: LDCC -> IO Int Source # getConnectionState :: LDCC -> IO ConnectionState Source # getPacketNumber :: LDCC -> IO PacketNumber Source # |
data ConnectionState Source #
Instances
Show ConnectionState Source # | |
Defined in Network.QUIC.Connector showsPrec :: Int -> ConnectionState -> ShowS # show :: ConnectionState -> String # showList :: [ConnectionState] -> ShowS # | |
Eq ConnectionState Source # | |
Defined in Network.QUIC.Connector (==) :: ConnectionState -> ConnectionState -> Bool # (/=) :: ConnectionState -> ConnectionState -> Bool # | |
Ord ConnectionState Source # | |
Defined in Network.QUIC.Connector compare :: ConnectionState -> ConnectionState -> Ordering # (<) :: ConnectionState -> ConnectionState -> Bool # (<=) :: ConnectionState -> ConnectionState -> Bool # (>) :: ConnectionState -> ConnectionState -> Bool # (>=) :: ConnectionState -> ConnectionState -> Bool # max :: ConnectionState -> ConnectionState -> ConnectionState # min :: ConnectionState -> ConnectionState -> ConnectionState # |
data FusionContext Source #
fusionSetup :: Cipher -> FusionContext -> Key -> IV -> IO () Source #
fusionEncrypt :: FusionContext -> Supplement -> Buffer -> PlainText -> AssDat -> PacketNumber -> IO Int Source #
fusionDecrypt :: FusionContext -> Buffer -> CipherText -> AssDat -> PacketNumber -> IO Int Source #
data Supplement Source #
fusionSetupSupplement :: Cipher -> Key -> IO Supplement Source #
fusionSetSample :: Supplement -> Buffer -> IO () Source #
fusionGetMask :: Supplement -> IO Buffer Source #
niteEncrypt :: Cipher -> Key -> IV -> PlainText -> AssDat -> PacketNumber -> Maybe (CipherText, CipherText) Source #
niteEncrypt' :: Cipher -> Key -> Nonce -> PlainText -> AssDat -> Maybe (CipherText, CipherText) Source #
niteDecrypt :: Cipher -> Key -> IV -> CipherText -> AssDat -> PacketNumber -> Maybe PlainText Source #
niteDecrypt' :: Cipher -> Key -> Nonce -> CipherText -> AssDat -> Maybe PlainText Source #
aes128gcmEncrypt :: Key -> Nonce -> PlainText -> AssDat -> Maybe (CipherText, CipherText) Source #
Types
type PlainText = ByteString Source #
type CipherText = ByteString Source #
A type for conneciton ID.
type Salt = ByteString Source #
Cipher algorithm
data InitialSecret Source #
type TrafficSecrets a = (ClientTrafficSecret a, ServerTrafficSecret a) #
Hold both client and server traffic secrets at the same step.
newtype ClientTrafficSecret a #
A client traffic secret, typed with a parameter indicating a step in the TLS key schedule.
Instances
Show (ClientTrafficSecret a) | |
Defined in Network.TLS.Types showsPrec :: Int -> ClientTrafficSecret a -> ShowS # show :: ClientTrafficSecret a -> String # showList :: [ClientTrafficSecret a] -> ShowS # |
newtype ServerTrafficSecret a #
A server traffic secret, typed with a parameter indicating a step in the TLS key schedule.
Instances
Show (ServerTrafficSecret a) | |
Defined in Network.TLS.Types showsPrec :: Int -> ServerTrafficSecret a -> ShowS # show :: ServerTrafficSecret a -> String # showList :: [ServerTrafficSecret a] -> ShowS # |
initialSecrets :: Version -> CID -> TrafficSecrets InitialSecret Source #
sampleLength :: Cipher -> Int Source #
bsXOR :: ByteString -> ByteString -> ByteString Source #
calculateIntegrityTag :: Version -> CID -> ByteString -> ByteString Source #
Builder
s denote sequences of bytes.
They are Monoid
s where
mempty
is the zero-length sequence and
mappend
is concatenation, which runs in O(1).
type DebugLogger = Builder -> IO () Source #
A type for debug logger.
dirDebugLogger :: Maybe FilePath -> CID -> IO (DebugLogger, IO ()) Source #
Encode
encodeVersionNegotiationPacket :: VersionNegotiationPacket -> IO ByteString Source #
This is not used internally.
encodePlainPacket :: Connection -> SizedBuffer -> PlainPacket -> Maybe Int -> IO (Int, Int) Source #
Decode
decodePacket :: ByteString -> IO (PacketI, ByteString) Source #
decodePackets :: ByteString -> IO [PacketI] Source #
decodeCryptPackets :: ByteString -> IO [(CryptPacket, EncryptionLevel, Int)] Source #
decryptCrypt :: Connection -> Crypt -> EncryptionLevel -> IO (Maybe Plain) Source #
Frame
encodeFrames :: [Frame] -> IO ByteString Source #
decodeFramesBuffer :: Buffer -> BufferSize -> IO (Maybe [Frame]) Source #
decodeFramesBS :: ByteString -> IO (Maybe [Frame]) Source #
Header
encodeLongHeaderFlags :: Version -> LongHeaderPacketType -> Flags Raw -> Flags Raw -> Bool -> IO (Flags Raw) Source #
Token
data CryptoToken Source #
CryptoToken | |
|
Instances
isRetryToken :: CryptoToken -> Bool Source #
generateToken :: Version -> Int -> IO CryptoToken Source #
generateRetryToken :: Version -> Int -> CID -> CID -> CID -> IO CryptoToken Source #
encryptToken :: TokenManager -> CryptoToken -> IO Token Source #
decryptToken :: TokenManager -> Token -> IO (Maybe CryptoToken) Source #
data Parameters Source #
QUIC transport parameters.
Instances
Show Parameters Source # | |
Defined in Network.QUIC.Parameters showsPrec :: Int -> Parameters -> ShowS # show :: Parameters -> String # showList :: [Parameters] -> ShowS # | |
Eq Parameters Source # | |
Defined in Network.QUIC.Parameters (==) :: Parameters -> Parameters -> Bool # (/=) :: Parameters -> Parameters -> Bool # | |
Qlog (Parameters, String) Source # | |
Defined in Network.QUIC.Qlog |
defaultParameters :: Parameters Source #
An example parameters obsoleted in the near future.
>>>
defaultParameters
Parameters {originalDestinationConnectionId = Nothing, maxIdleTimeout = 30000, statelessResetToken = Nothing, maxUdpPayloadSize = 2048, initialMaxData = 1048576, initialMaxStreamDataBidiLocal = 262144, initialMaxStreamDataBidiRemote = 262144, initialMaxStreamDataUni = 262144, initialMaxStreamsBidi = 64, initialMaxStreamsUni = 3, ackDelayExponent = 3, maxAckDelay = 25, disableActiveMigration = False, preferredAddress = Nothing, activeConnectionIdLimit = 3, initialSourceConnectionId = Nothing, retrySourceConnectionId = Nothing, grease = Nothing, greaseQuicBit = True, versionInformation = Nothing}
baseParameters :: Parameters Source #
The default value for QUIC transport parameters.
AuthCIDs | |
|
Instances
setCIDsToParameters :: AuthCIDs -> Parameters -> Parameters Source #
newQlogger :: TimeMicrosecond -> ByteString -> CID -> FastLogger -> IO QLogger Source #
Instances
Qlog Debug Source # | |
Qlog LR Source # | |
Qlog SentPacket Source # | |
Defined in Network.QUIC.Recovery.Types qlog :: SentPacket -> LogStr Source # | |
Qlog Frame Source # | |
Qlog CryptPacket Source # | |
Defined in Network.QUIC.Qlog qlog :: CryptPacket -> LogStr Source # | |
Qlog Header Source # | |
Qlog PlainPacket Source # | |
Defined in Network.QUIC.Qlog qlog :: PlainPacket -> LogStr Source # | |
Qlog RetryPacket Source # | |
Defined in Network.QUIC.Qlog qlog :: RetryPacket -> LogStr Source # | |
Qlog StatelessReset Source # | |
Defined in Network.QUIC.Qlog qlog :: StatelessReset -> LogStr Source # | |
Qlog VersionNegotiationPacket Source # | |
Defined in Network.QUIC.Qlog | |
Qlog (Parameters, String) Source # | |
Defined in Network.QUIC.Qlog |
class KeepQlog a where Source #
Instances
KeepQlog Connection Source # | |
Defined in Network.QUIC.Connection.Types keepQlog :: Connection -> QLogger Source # | |
KeepQlog LDCC Source # | |
qlogReceived :: (KeepQlog q, Qlog a) => q -> a -> TimeMicrosecond -> IO () Source #
qlogRecvInitial :: KeepQlog q => q -> IO () Source #
qlogSentRetry :: KeepQlog q => q -> IO () Source #
qlogParamsSet :: KeepQlog q => q -> (Parameters, String) -> IO () Source #
packetType :: Header -> LogStr Source #
Types
An abstract data type for streams.
streamConnection :: Stream -> Connection Source #
data StreamState Source #
Instances
Show StreamState Source # | |
Defined in Network.QUIC.Stream.Types showsPrec :: Int -> StreamState -> ShowS # show :: StreamState -> String # showList :: [StreamState] -> ShowS # | |
Eq StreamState Source # | |
Defined in Network.QUIC.Stream.Types (==) :: StreamState -> StreamState -> Bool # (/=) :: StreamState -> StreamState -> Bool # |
data RecvStreamQ Source #
data RxStreamData Source #
RxStreamData | |
|
Instances
Show RxStreamData Source # | |
Defined in Network.QUIC.Stream.Types showsPrec :: Int -> RxStreamData -> ShowS # show :: RxStreamData -> String # showList :: [RxStreamData] -> ShowS # | |
Eq RxStreamData Source # | |
Defined in Network.QUIC.Stream.Types (==) :: RxStreamData -> RxStreamData -> Bool # (/=) :: RxStreamData -> RxStreamData -> Bool # |
Misc
setTxStreamClosed :: Stream -> IO () Source #
setRxStreamClosed :: Stream -> IO () Source #
Reass
takeRecvStreamQwithSize :: Stream -> Int -> IO ByteString Source #
putRxStreamData :: Stream -> RxStreamData -> IO FlowCntl Source #
tryReassemble :: Stream -> RxStreamData -> (StreamData -> IO ()) -> IO () -> IO Bool Source #
Table
data StreamTable Source #
lookupStream :: StreamId -> StreamTable -> Maybe Stream Source #
insertStream :: StreamId -> Stream -> StreamTable -> StreamTable Source #
deleteStream :: StreamId -> StreamTable -> StreamTable Source #
insertCryptoStreams :: Connection -> StreamTable -> IO StreamTable Source #
clientHandshaker :: QUICCallbacks -> ClientConfig -> Version -> AuthCIDs -> SessionEstablish -> Bool -> IO () Source #
serverHandshaker :: QUICCallbacks -> ServerConfig -> Version -> IO Parameters -> IO () Source #
type Bytes = ShortByteString Source #
All internal byte sequences.
ByteString
should be used for FFI related stuff.
type PacketNumber = Int Source #
AckInfo PacketNumber Range [(Gap, Range)] |
toAckInfo :: [PacketNumber] -> AckInfo Source #
>>>
toAckInfo [9]
AckInfo 9 0 []>>>
toAckInfo [9,8,7]
AckInfo 9 2 []>>>
toAckInfo [8,7,3,2]
AckInfo 8 1 [(2,1)]>>>
toAckInfo [9,8,7,5,4]
AckInfo 9 2 [(0,1)]
fromAckInfo :: AckInfo -> [PacketNumber] Source #
>>>
fromAckInfo $ AckInfo 9 0 []
[9]>>>
fromAckInfo $ AckInfo 9 2 []
[7,8,9]>>>
fromAckInfo $ AckInfo 8 1 [(2,1)]
[2,3,7,8]>>>
fromAckInfo $ AckInfo 9 2 [(0,1)]
[4,5,7,8,9]
fromAckInfoWithMin :: AckInfo -> PacketNumber -> [PacketNumber] Source #
>>>
fromAckInfoWithMin (AckInfo 9 0 []) 1
[9]>>>
fromAckInfoWithMin (AckInfo 9 2 []) 8
[8,9]>>>
fromAckInfoWithMin (AckInfo 8 1 [(2,1)]) 3
[3,7,8]>>>
fromAckInfoWithMin (AckInfo 9 2 [(0,1)]) 8
[8,9]
fromAckInfoToPred :: AckInfo -> PacketNumber -> Bool Source #
newtype PeerPacketNumbers Source #
Instances
Show PeerPacketNumbers Source # | |
Defined in Network.QUIC.Types.Ack showsPrec :: Int -> PeerPacketNumbers -> ShowS # show :: PeerPacketNumbers -> String # showList :: [PeerPacketNumbers] -> ShowS # | |
Eq PeerPacketNumbers Source # | |
Defined in Network.QUIC.Types.Ack (==) :: PeerPacketNumbers -> PeerPacketNumbers -> Bool # (/=) :: PeerPacketNumbers -> PeerPacketNumbers -> Bool # |
A type for conneciton ID.
myCIDLength :: Int Source #
fromCID :: CID -> ByteString Source #
Converting a connection ID.
toCID :: ByteString -> CID Source #
makeCID :: ShortByteString -> CID Source #
newtype StatelessResetToken Source #
Instances
Show StatelessResetToken Source # | |
Defined in Network.QUIC.Types.CID showsPrec :: Int -> StatelessResetToken -> ShowS # show :: StatelessResetToken -> String # showList :: [StatelessResetToken] -> ShowS # | |
Eq StatelessResetToken Source # | |
Defined in Network.QUIC.Types.CID (==) :: StatelessResetToken -> StatelessResetToken -> Bool # (/=) :: StatelessResetToken -> StatelessResetToken -> Bool # | |
Ord StatelessResetToken Source # | |
Defined in Network.QUIC.Types.CID compare :: StatelessResetToken -> StatelessResetToken -> Ordering # (<) :: StatelessResetToken -> StatelessResetToken -> Bool # (<=) :: StatelessResetToken -> StatelessResetToken -> Bool # (>) :: StatelessResetToken -> StatelessResetToken -> Bool # (>=) :: StatelessResetToken -> StatelessResetToken -> Bool # max :: StatelessResetToken -> StatelessResetToken -> StatelessResetToken # min :: StatelessResetToken -> StatelessResetToken -> StatelessResetToken # |
newPathData :: IO PathData Source #
newtype TransportError Source #
Transport errors of QUIC.
Instances
Show TransportError Source # | |
Defined in Network.QUIC.Types.Error showsPrec :: Int -> TransportError -> ShowS # show :: TransportError -> String # showList :: [TransportError] -> ShowS # | |
Eq TransportError Source # | |
Defined in Network.QUIC.Types.Error (==) :: TransportError -> TransportError -> Bool # (/=) :: TransportError -> TransportError -> Bool # |
pattern NoError :: TransportError Source #
pattern InternalError :: TransportError Source #
pattern ConnectionRefused :: TransportError Source #
pattern FlowControlError :: TransportError Source #
pattern StreamLimitError :: TransportError Source #
pattern StreamStateError :: TransportError Source #
pattern FinalSizeError :: TransportError Source #
pattern FrameEncodingError :: TransportError Source #
pattern TransportParameterError :: TransportError Source #
pattern ConnectionIdLimitError :: TransportError Source #
pattern ProtocolViolation :: TransportError Source #
pattern InvalidToken :: TransportError Source #
pattern ApplicationError :: TransportError Source #
pattern CryptoBufferExceeded :: TransportError Source #
pattern KeyUpdateError :: TransportError Source #
pattern AeadLimitReached :: TransportError Source #
pattern NoViablePath :: TransportError Source #
pattern VersionNegotiationError :: TransportError Source #
cryptoError :: AlertDescription -> TransportError Source #
Converting a TLS alert to a corresponding transport error.
newtype ApplicationProtocolError Source #
Application protocol errors of QUIC.
Instances
Show ApplicationProtocolError Source # | |
Defined in Network.QUIC.Types.Error showsPrec :: Int -> ApplicationProtocolError -> ShowS # show :: ApplicationProtocolError -> String # showList :: [ApplicationProtocolError] -> ShowS # | |
Eq ApplicationProtocolError Source # | |
Defined in Network.QUIC.Types.Error |
data QUICException Source #
User level exceptions for QUIC.
Instances
Exception QUICException Source # | |
Defined in Network.QUIC.Types.Exception | |
Show QUICException Source # | |
Defined in Network.QUIC.Types.Exception showsPrec :: Int -> QUICException -> ShowS # show :: QUICException -> String # showList :: [QUICException] -> ShowS # |
data InternalControl Source #
Instances
Exception InternalControl Source # | |
Defined in Network.QUIC.Types.Exception | |
Show InternalControl Source # | |
Defined in Network.QUIC.Types.Exception showsPrec :: Int -> InternalControl -> ShowS # show :: InternalControl -> String # showList :: [InternalControl] -> ShowS # | |
Eq InternalControl Source # | |
Defined in Network.QUIC.Types.Exception (==) :: InternalControl -> InternalControl -> Bool # (/=) :: InternalControl -> InternalControl -> Bool # |
newtype NextVersion Source #
Instances
Exception NextVersion Source # | |
Defined in Network.QUIC.Types.Exception | |
Show NextVersion Source # | |
Defined in Network.QUIC.Types.Exception showsPrec :: Int -> NextVersion -> ShowS # show :: NextVersion -> String # showList :: [NextVersion] -> ShowS # |
Instances
Exception Abort Source # | |
Defined in Network.QUIC.Types.Exception toException :: Abort -> SomeException # fromException :: SomeException -> Maybe Abort # displayException :: Abort -> String # | |
Show Abort Source # | |
type ReasonPhrase = ShortByteString Source #
Stream identifier. This should be 62-bit interger. On 32-bit machines, the total number of stream identifiers is limited.
isClientInitiatedBidirectional :: StreamId -> Bool Source #
Checking if a stream is client-initiated bidirectional.
isServerInitiatedBidirectional :: StreamId -> Bool Source #
Checking if a stream is server-initiated bidirectional.
isClientInitiatedUnidirectional :: StreamId -> Bool Source #
Checking if a stream is client-initiated unidirectional.
isServerInitiatedUnidirectional :: StreamId -> Bool Source #
Checking if a stream is server-initiated unidirectional.
isClientInitiated :: StreamId -> Bool Source #
isServerInitiated :: StreamId -> Bool Source #
isBidirectional :: StreamId -> Bool Source #
isUnidirectional :: StreamId -> Bool Source #
type Delay = Milliseconds Source #
type CryptoData = ByteString Source #
type StreamData = ByteString Source #
type Token = ByteString Source #
emptyToken :: Token Source #
ackEliciting :: Frame -> Bool Source #
pathValidating :: Frame -> Bool Source #
rateControled :: Frame -> Bool Source #
encodeInt :: Int64 -> ByteString Source #
>>>
enc16 $ encodeInt 151288809941952652
"c2197c5eff14e88c">>>
enc16 $ encodeInt 494878333
"9d7f3e7d">>>
enc16 $ encodeInt 15293
"7bbd">>>
enc16 $ encodeInt 37
"25"
encodeInt8 :: Int64 -> ByteString Source #
encodeInt' :: WriteBuffer -> Int64 -> IO () Source #
encodeInt'2 :: WriteBuffer -> Int64 -> IO () Source #
encodeInt'4 :: WriteBuffer -> Int64 -> IO () Source #
decodeInt :: ByteString -> Int64 Source #
>>>
decodeInt (dec16 "c2197c5eff14e88c")
151288809941952652>>>
decodeInt (dec16 "9d7f3e7d")
494878333>>>
decodeInt (dec16 "7bbd")
15293>>>
decodeInt (dec16 "25")
37
decodeInt' :: ReadBuffer -> IO Int64 Source #
QUIC version.
pattern Negotiation :: Version Source #
pattern GreasingVersion :: Version Source #
pattern GreasingVersion2 :: Version Source #
isGreasingVersion :: Version -> Bool Source #
data VersionInfo Source #
Instances
Show VersionInfo Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> VersionInfo -> ShowS # show :: VersionInfo -> String # showList :: [VersionInfo] -> ShowS # | |
Eq VersionInfo Source # | |
Defined in Network.QUIC.Types.Packet (==) :: VersionInfo -> VersionInfo -> Bool # (/=) :: VersionInfo -> VersionInfo -> Bool # |
data VersionNegotiationPacket Source #
Instances
Show VersionNegotiationPacket Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> VersionNegotiationPacket -> ShowS # show :: VersionNegotiationPacket -> String # showList :: [VersionNegotiationPacket] -> ShowS # | |
Eq VersionNegotiationPacket Source # | |
Defined in Network.QUIC.Types.Packet | |
Qlog VersionNegotiationPacket Source # | |
Defined in Network.QUIC.Qlog |
data RetryPacket Source #
Instances
Show RetryPacket Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> RetryPacket -> ShowS # show :: RetryPacket -> String # showList :: [RetryPacket] -> ShowS # | |
Eq RetryPacket Source # | |
Defined in Network.QUIC.Types.Packet (==) :: RetryPacket -> RetryPacket -> Bool # (/=) :: RetryPacket -> RetryPacket -> Bool # | |
Qlog RetryPacket Source # | |
Defined in Network.QUIC.Qlog qlog :: RetryPacket -> LogStr Source # |
data BrokenPacket Source #
Instances
Show BrokenPacket Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> BrokenPacket -> ShowS # show :: BrokenPacket -> String # showList :: [BrokenPacket] -> ShowS # | |
Eq BrokenPacket Source # | |
Defined in Network.QUIC.Types.Packet (==) :: BrokenPacket -> BrokenPacket -> Bool # (/=) :: BrokenPacket -> BrokenPacket -> Bool # |
headerMyCID :: Header -> CID Source #
headerPeerCID :: Header -> CID Source #
data PlainPacket Source #
Instances
Show PlainPacket Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> PlainPacket -> ShowS # show :: PlainPacket -> String # showList :: [PlainPacket] -> ShowS # | |
Eq PlainPacket Source # | |
Defined in Network.QUIC.Types.Packet (==) :: PlainPacket -> PlainPacket -> Bool # (/=) :: PlainPacket -> PlainPacket -> Bool # | |
Qlog PlainPacket Source # | |
Defined in Network.QUIC.Qlog qlog :: PlainPacket -> LogStr Source # |
data CryptPacket Source #
Instances
Show CryptPacket Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> CryptPacket -> ShowS # show :: CryptPacket -> String # showList :: [CryptPacket] -> ShowS # | |
Eq CryptPacket Source # | |
Defined in Network.QUIC.Types.Packet (==) :: CryptPacket -> CryptPacket -> Bool # (/=) :: CryptPacket -> CryptPacket -> Bool # | |
Qlog CryptPacket Source # | |
Defined in Network.QUIC.Qlog qlog :: CryptPacket -> LogStr Source # |
Plain | |
|
setIllegalReservedBits :: Int -> Int Source #
setUnknownFrame :: Int -> Int Source #
setNoFrames :: Int -> Int Source #
setNoPaddings :: Int -> Int Source #
set4bytesPN :: Int -> Int Source #
isIllegalReservedBits :: Int -> Bool Source #
isUnknownFrame :: Int -> Bool Source #
isNoFrames :: Int -> Bool Source #
isNoPaddings :: Int -> Bool Source #
is4bytesPN :: Int -> Bool Source #
data MigrationInfo Source #
Instances
Show MigrationInfo Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> MigrationInfo -> ShowS # show :: MigrationInfo -> String # showList :: [MigrationInfo] -> ShowS # | |
Eq MigrationInfo Source # | |
Defined in Network.QUIC.Types.Packet (==) :: MigrationInfo -> MigrationInfo -> Bool # (/=) :: MigrationInfo -> MigrationInfo -> Bool # |
isCryptDelayed :: Crypt -> Bool Source #
setCryptDelayed :: Crypt -> Crypt Source #
data StatelessReset Source #
Instances
Show StatelessReset Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> StatelessReset -> ShowS # show :: StatelessReset -> String # showList :: [StatelessReset] -> ShowS # | |
Eq StatelessReset Source # | |
Defined in Network.QUIC.Types.Packet (==) :: StatelessReset -> StatelessReset -> Bool # (/=) :: StatelessReset -> StatelessReset -> Bool # | |
Qlog StatelessReset Source # | |
Defined in Network.QUIC.Qlog qlog :: StatelessReset -> LogStr Source # |
data ReceivedPacket Source #
Instances
Show ReceivedPacket Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> ReceivedPacket -> ShowS # show :: ReceivedPacket -> String # showList :: [ReceivedPacket] -> ShowS # | |
Eq ReceivedPacket Source # | |
Defined in Network.QUIC.Types.Packet (==) :: ReceivedPacket -> ReceivedPacket -> Bool # (/=) :: ReceivedPacket -> ReceivedPacket -> Bool # |
mkReceivedPacket :: CryptPacket -> TimeMicrosecond -> Int -> EncryptionLevel -> ReceivedPacket Source #
data LongHeaderPacketType Source #
Instances
Show LongHeaderPacketType Source # | |
Defined in Network.QUIC.Types.Packet showsPrec :: Int -> LongHeaderPacketType -> ShowS # show :: LongHeaderPacketType -> String # showList :: [LongHeaderPacketType] -> ShowS # | |
Eq LongHeaderPacketType Source # | |
Defined in Network.QUIC.Types.Packet (==) :: LongHeaderPacketType -> LongHeaderPacketType -> Bool # (/=) :: LongHeaderPacketType -> LongHeaderPacketType -> Bool # |
data EncryptionLevel Source #
Instances
Instances
type EncodedPacketNumber = Word32 Source #
writeRecvQ :: RecvQ -> ReceivedPacket -> IO () Source #
prependRecvQ :: RecvQ -> ReceivedPacket -> STM () Source #
type SessionEstablish = SessionID -> SessionData -> IO (Maybe Ticket) Source #
data ResumptionInfo Source #
Information about resumption
Instances
is0RTTPossible :: ResumptionInfo -> Bool Source #
Is 0RTT possible?
isResumptionPossible :: ResumptionInfo -> Bool Source #
Is resumption possible?
newtype Milliseconds Source #
Instances
newtype Microseconds Source #
Instances
type TimeMicrosecond = UnixTime Source #
dec16 :: ByteString -> ByteString Source #
enc16 :: ByteString -> ByteString Source #
getRandomBytes :: Int -> IO ShortByteString Source #
totalLen :: [ByteString] -> Int Source #
withByteString :: ByteString -> (Ptr Word8 -> IO a) -> IO a Source #
shortpack :: String -> ShortByteString Source #
ignore :: SomeException -> IO () Source #
takePingSTM :: LDCC -> STM EncryptionLevel Source #
onPacketSent :: LDCC -> SentPacket -> IO () Source #
onPacketReceived :: LDCC -> EncryptionLevel -> PacketNumber -> IO () Source #
onAckReceived :: LDCC -> EncryptionLevel -> AckInfo -> Microseconds -> IO () Source #
onPacketNumberSpaceDiscarded :: LDCC -> EncryptionLevel -> IO () Source #
setPreviousRTT1PPNs :: LDCC -> PeerPacketNumbers -> IO () Source #
setMaxAckDaley :: LDCC -> Microseconds -> IO () Source #
findDuration :: Seq SentPacket -> PacketNumber -> Maybe UnixDiffTime Source #
releaseByRetry :: LDCC -> IO (Seq PlainPacket) Source #
releaseOldest :: LDCC -> EncryptionLevel -> IO (Maybe SentPacket) Source #
beforeAntiAmp :: LDCC -> IO () Source #
data SentPacket Source #
Instances
Show SentPacket Source # | |
Defined in Network.QUIC.Recovery.Types showsPrec :: Int -> SentPacket -> ShowS # show :: SentPacket -> String # showList :: [SentPacket] -> ShowS # | |
Eq SentPacket Source # | |
Defined in Network.QUIC.Recovery.Types (==) :: SentPacket -> SentPacket -> Bool # (/=) :: SentPacket -> SentPacket -> Bool # | |
Ord SentPacket Source # | |
Defined in Network.QUIC.Recovery.Types compare :: SentPacket -> SentPacket -> Ordering # (<) :: SentPacket -> SentPacket -> Bool # (<=) :: SentPacket -> SentPacket -> Bool # (>) :: SentPacket -> SentPacket -> Bool # (>=) :: SentPacket -> SentPacket -> Bool # max :: SentPacket -> SentPacket -> SentPacket # min :: SentPacket -> SentPacket -> SentPacket # | |
Qlog SentPacket Source # | |
Defined in Network.QUIC.Recovery.Types qlog :: SentPacket -> LogStr Source # |
spSentBytes :: SentPacket -> Int Source #
spAckEliciting :: SentPacket -> Bool Source #
mkSentPacket :: PacketNumber -> EncryptionLevel -> PlainPacket -> PeerPacketNumbers -> Bool -> SentPacket Source #
fixSentPacket :: SentPacket -> Int -> Int -> SentPacket Source #
Instances
Connector LDCC Source # | |
Defined in Network.QUIC.Recovery.Types getRole :: LDCC -> Role Source # getEncryptionLevel :: LDCC -> IO EncryptionLevel Source # getMaxPacketSize :: LDCC -> IO Int Source # getConnectionState :: LDCC -> IO ConnectionState Source # getPacketNumber :: LDCC -> IO PacketNumber Source # | |
KeepQlog LDCC Source # | |
data ConnectionControl Source #
How to control a connection.
Instances
Show ConnectionControl Source # | |
Defined in Network.QUIC.Client.Reader showsPrec :: Int -> ConnectionControl -> ShowS # show :: ConnectionControl -> String # showList :: [ConnectionControl] -> ShowS # | |
Eq ConnectionControl Source # | |
Defined in Network.QUIC.Client.Reader (==) :: ConnectionControl -> ConnectionControl -> Bool # (/=) :: ConnectionControl -> ConnectionControl -> Bool # |
controlConnection :: Connection -> ConnectionControl -> IO Bool Source #
windowsThreadBlockHack :: IO a -> IO a Source #