mmm-0.1.0.0: Minecraft 1.21.4 implementation in Haskell
Copyright(c) axionbuster 2025
LicenseBSD-3-Clause
Safe HaskellNone
LanguageGHC2021

M.IO.Internal.Datagram

Contents

Description

Internal module for handling low-level packet parsing and building, including uninterpreted packets and stream transformations.

Synopsis

Types

data Uninterpreted Source #

uninterpreted packet

Constructors

Uninterpreted 

Fields

Instances

Instances details
Data Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Uninterpreted -> c Uninterpreted #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Uninterpreted #

toConstr :: Uninterpreted -> Constr #

dataTypeOf :: Uninterpreted -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Uninterpreted) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Uninterpreted) #

gmapT :: (forall b. Data b => b -> b) -> Uninterpreted -> Uninterpreted #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Uninterpreted -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Uninterpreted -> r #

gmapQ :: (forall d. Data d => d -> u) -> Uninterpreted -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Uninterpreted -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Uninterpreted -> m Uninterpreted #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Uninterpreted -> m Uninterpreted #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Uninterpreted -> m Uninterpreted #

Generic Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

Associated Types

type Rep Uninterpreted 
Instance details

Defined in M.IO.Internal.Datagram

type Rep Uninterpreted = D1 ('MetaData "Uninterpreted" "M.IO.Internal.Datagram" "mmm-0.1.0.0-oCDsNp3EBL2JzoyA6cTai" 'False) (C1 ('MetaCons "Uninterpreted" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkcode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "pkdata") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)))
Show Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

NFData Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

Methods

rnf :: Uninterpreted -> () #

Eq Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

Ord Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

Hashable Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

Lift Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

Methods

lift :: Quote m => Uninterpreted -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => Uninterpreted -> Code m Uninterpreted #

type Rep Uninterpreted Source # 
Instance details

Defined in M.IO.Internal.Datagram

type Rep Uninterpreted = D1 ('MetaData "Uninterpreted" "M.IO.Internal.Datagram" "mmm-0.1.0.0-oCDsNp3EBL2JzoyA6cTai" 'False) (C1 ('MetaCons "Uninterpreted" 'PrefixI 'True) (S1 ('MetaSel ('Just "pkcode") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word8) :*: S1 ('MetaSel ('Just "pkdata") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ByteString)))

data EOF Source #

end of input

Constructors

EOF 

Instances

Instances details
Data EOF Source # 
Instance details

Defined in M.IO.Internal.Datagram

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EOF -> c EOF #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EOF #

toConstr :: EOF -> Constr #

dataTypeOf :: EOF -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EOF) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EOF) #

gmapT :: (forall b. Data b => b -> b) -> EOF -> EOF #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EOF -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EOF -> r #

gmapQ :: (forall d. Data d => d -> u) -> EOF -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EOF -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EOF -> m EOF #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EOF -> m EOF #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EOF -> m EOF #

Exception EOF Source # 
Instance details

Defined in M.IO.Internal.Datagram

Generic EOF Source # 
Instance details

Defined in M.IO.Internal.Datagram

Associated Types

type Rep EOF 
Instance details

Defined in M.IO.Internal.Datagram

type Rep EOF = D1 ('MetaData "EOF" "M.IO.Internal.Datagram" "mmm-0.1.0.0-oCDsNp3EBL2JzoyA6cTai" 'False) (C1 ('MetaCons "EOF" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: EOF -> Rep EOF x #

to :: Rep EOF x -> EOF #

Read EOF Source # 
Instance details

Defined in M.IO.Internal.Datagram

Show EOF Source # 
Instance details

Defined in M.IO.Internal.Datagram

Methods

showsPrec :: Int -> EOF -> ShowS #

show :: EOF -> String #

showList :: [EOF] -> ShowS #

Lift EOF Source # 
Instance details

Defined in M.IO.Internal.Datagram

Methods

lift :: Quote m => EOF -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => EOF -> Code m EOF #

type Rep EOF Source # 
Instance details

Defined in M.IO.Internal.Datagram

type Rep EOF = D1 ('MetaData "EOF" "M.IO.Internal.Datagram" "mmm-0.1.0.0-oCDsNp3EBL2JzoyA6cTai" 'False) (C1 ('MetaCons "EOF" 'PrefixI 'False) (U1 :: Type -> Type))

Streams

makepacketstreami Source #

Arguments

:: TVar Int

compression threshold reference (negative = off, non-negative = on with threshold)

-> InputStream ByteString

input stream

-> IO (InputStream Uninterpreted)

stream of uninterpreted packets

make a stream of uninterpreted packets

makepacketstreamo :: TVar Int -> OutputStream ByteString -> IO (OutputStream Uninterpreted) Source #

make an output stream of uninterpreted packets

makedecrypting Source #

Arguments

:: TVar (ByteString -> IO ByteString)

decryptor

-> InputStream ByteString

input stream

-> IO (InputStream ByteString)

new input stream

register an octet streaming decryptor to an input stream

makeencrypting Source #

Arguments

:: TVar (ByteString -> IO ByteString)

encryptor

-> OutputStream ByteString

output stream

-> IO (OutputStream ByteString)

new output stream

register an octet stremaing encryptor to an output stream