quic 0.2.1 → 0.2.2
raw patch · 3 files changed
+19/−14 lines, 3 filesdep ~containersdep ~filepathPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: containers, filepath
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Network/QUIC/Receiver.hs +14/−13
- quic.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog +## 0.2.2++# Introducing streamNotCreatedYet for STOP_SENDING.+ ## 0.2.1 * Using recvMsg and sendBufMsg.
Network/QUIC/Receiver.hs view
@@ -210,14 +210,21 @@ | otherwise = isServerInitiated sid guardStream :: Connection -> StreamId -> Maybe Stream -> IO ()-guardStream conn sid Nothing+guardStream conn sid Nothing =+ streamNotCreatedYet+ conn+ sid+ "a locally-initiated stream that has not yet been created"+guardStream _ _ _ = return ()++-- fixme: what about unidirection stream?+streamNotCreatedYet :: Connection -> StreamId -> ReasonPhrase -> IO ()+streamNotCreatedYet conn sid emsg | isInitiated conn sid = do curSid <- getMyStreamId conn when (sid > curSid) $- closeConnection- StreamStateError- "a locally-initiated stream that has not yet been created"-guardStream _ _ _ = return ()+ closeConnection StreamStateError emsg+streamNotCreatedYet _ _ _ = return () processFrame :: Connection -> EncryptionLevel -> Frame -> IO () processFrame _ _ Padding{} = return ()@@ -247,9 +254,7 @@ closeConnection StreamStateError "Receive-only stream" mstrm <- findStream conn sid case mstrm of- Nothing -> do- when (isInitiated conn sid) $- closeConnection StreamStateError "No such stream for STOP_SENDING"+ Nothing -> streamNotCreatedYet conn sid "No such stream for STOP_SENDING" Just _strm -> sendFramesLim conn lvl [ResetStream sid err 0] processFrame _ _ (CryptoF _ "") = return () processFrame conn lvl (CryptoF off cdat) = do@@ -338,11 +343,7 @@ closeConnection StreamStateError "Receive-only stream" mstrm <- findStream conn sid case mstrm of- Nothing ->- when (isInitiated conn sid) $ do- curSid <- getMyStreamId conn- when (sid > curSid) $- closeConnection StreamStateError "No such stream for MAX_STREAM_DATA"+ Nothing -> streamNotCreatedYet conn sid "No such stream for MAX_STREAM_DATA" Just strm -> setTxMaxStreamData strm n processFrame conn lvl (MaxStreams dir n) = do when (lvl == InitialLevel || lvl == HandshakeLevel) $
quic.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: quic-version: 0.2.1+version: 0.2.2 license: BSD3 license-file: LICENSE maintainer: kazu@iij.ad.jp