refactor transport encoding, make client IO error "temporary" (#634)

* file server/client framework

* refactor

* make IOError temporary

* fix test
This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2023-02-10 19:06:28 +00:00
1 parent b342b1dc59
commit eb1723acce
9 files changed
+55 -36

No files matched your search

+3
View File
@@ -19,6 +19,9 @@ import Simplex.Messaging.Transport (SessionId, TLS (tlsUniq), Transport (cGet, c
import Simplex.Messaging.Transport.Buffer
import qualified System.TimeManager as TI
defaultHTTP2BufferSize :: BufferSize
defaultHTTP2BufferSize = 32768
withHTTP2 :: BufferSize -> (Config -> SessionId -> IO ()) -> TLS -> IO ()
withHTTP2 sz run c = E.bracket (allocHTTP2Config c sz) freeSimpleConfig (`run` tlsUniq c)