From 5c4a0d345b3cc00861c0f6fb71e9746f292d3f9b Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Sat, 11 Feb 2012 10:50:41 +0000 Subject: [PATCH] rename more Bytes to B.ByteString. --- Network/TLS/Context.hs | 4 ++-- Network/TLS/Core.hs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Network/TLS/Context.hs b/Network/TLS/Context.hs index bc76d78..2b25a2d 100644 --- a/Network/TLS/Context.hs +++ b/Network/TLS/Context.hs @@ -64,8 +64,8 @@ import Prelude hiding (catch) data TLSLogging = TLSLogging { loggingPacketSent :: String -> IO () , loggingPacketRecv :: String -> IO () - , loggingIOSent :: Bytes -> IO () - , loggingIORecv :: Header -> Bytes -> IO () + , loggingIOSent :: B.ByteString -> IO () + , loggingIORecv :: Header -> B.ByteString -> IO () } data TLSParams = TLSParams diff --git a/Network/TLS/Core.hs b/Network/TLS/Core.hs index 9c1200b..4fe669b 100644 --- a/Network/TLS/Core.hs +++ b/Network/TLS/Core.hs @@ -178,8 +178,8 @@ clientWith :: (MonadIO m, CryptoRandomGen g) -> g -- ^ Random number generator associated -> c -- ^ An abstract connection type -> IO () -- ^ A method for the connection buffer to be flushed - -> (Bytes -> IO ()) -- ^ A method for sending bytes through the connection - -> (Int -> IO Bytes) -- ^ A method for receiving bytes through the connection + -> (B.ByteString -> IO ()) -- ^ A method for sending bytes through the connection + -> (Int -> IO B.ByteString) -- ^ A method for receiving bytes through the connection -> m (TLSCtx c) clientWith params rng connection flushF sendF recvF = liftIO $ newCtxWith connection flushF sendF recvF params st @@ -196,7 +196,7 @@ client params rng handle = liftIO $ newCtx handle params st where st = (newTLSState rng) { stClientContext = True } -- | Create a new Server context with a configuration, a RNG, a generic connection and the connection operation. -serverWith :: (MonadIO m, CryptoRandomGen g) => TLSParams -> g -> c -> IO () -> (Bytes -> IO ()) -> (Int -> IO Bytes) -> m (TLSCtx c) +serverWith :: (MonadIO m, CryptoRandomGen g) => TLSParams -> g -> c -> IO () -> (B.ByteString -> IO ()) -> (Int -> IO B.ByteString) -> m (TLSCtx c) serverWith params rng connection flushF sendF recvF = liftIO $ newCtxWith connection flushF sendF recvF params st where st = (newTLSState rng) { stClientContext = False }