| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Database.Bolty.Connection.Connection
Description
Internal module. Not part of the public API.
Synopsis
- connect :: (MonadIO m, HasCallStack) => Bool -> Text -> Word16 -> Int -> m (Connection, Int)
- close :: (MonadIO m, HasCallStack) => Connection -> Int -> m ()
- send :: (MonadIO m, HasCallStack) => Connection -> Int -> ByteString -> m ()
- receiveBytestring :: (MonadIO m, HasCallStack) => Connection -> Int -> Int -> m ByteString
- receiveBinary :: (HasEndianness a, MonadIO m, HasCallStack) => Connection -> Int -> Int -> m a
Documentation
connect :: (MonadIO m, HasCallStack) => Bool -> Text -> Word16 -> Int -> m (Connection, Int) Source #
Open a raw TCP connection to the given host and port with optional TLS.
close :: (MonadIO m, HasCallStack) => Connection -> Int -> m () Source #
Close a raw TCP connection.
send :: (MonadIO m, HasCallStack) => Connection -> Int -> ByteString -> m () Source #
Send raw bytes over the connection with a timeout.
receiveBytestring :: (MonadIO m, HasCallStack) => Connection -> Int -> Int -> m ByteString Source #
Receive exactly size bytes from the connection with a timeout.
receiveBinary :: (HasEndianness a, MonadIO m, HasCallStack) => Connection -> Int -> Int -> m a Source #
Receive and decode a big-endian binary value from the connection.