| Copyright | (c) axionbuster 2025 |
|---|---|
| License | BSD-3-Clause |
| Safe Haskell | None |
| Language | GHC2021 |
M.IO
Description
Provides high-level IO operations and types for handling Minecraft protocol connections, including socket management and data streaming.
Synopsis
- data Connection = Connection {
- cxkey :: TVar (Maybe ByteString)
- cxcompth :: TVar Int
- cxinput :: InputStream Uninterpreted
- cxoutput :: OutputStream Uninterpreted
- data Uninterpreted = Uninterpreted {
- pkcode :: !Word8
- pkdata :: !ByteString
- module M.IO.Internal.EffectTypes
- withtalkingserver :: forall (es :: [Effect]) a. (IOE :> es, State ParserState :> es, Concurrent :> es, NonDet :> es) => Maybe String -> String -> Eff (Talking ': es) a -> Eff es a
- withcxfromsocket :: MonadUnliftIO m => Socket -> (Connection -> m a) -> m a
Documentation
data Connection Source #
a connection to either a server or a client
Constructors
| Connection | |
Fields
| |
data Uninterpreted Source #
uninterpreted packet
Constructors
| Uninterpreted | |
Fields
| |
Instances
define communication effects
module M.IO.Internal.EffectTypes
Arguments
| :: forall (es :: [Effect]) a. (IOE :> es, State ParserState :> es, Concurrent :> es, NonDet :> es) | |
| => Maybe String | host (Nothing = all interfaces) |
| -> String | port |
| -> Eff (Talking ': es) a | per-connection handler |
| -> Eff es a | final result |
run server accepting multiple connections
withcxfromsocket :: MonadUnliftIO m => Socket -> (Connection -> m a) -> m a Source #
create a connection from a socket