| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.IRC.DCC.Internal
Synopsis
- class CtcpCommand a where
- parseCtcp :: Parser a -> CTCPByteString -> Either String a
- data DccChat
- = Chat !IPv4 !PortNumber
- | ChatWhiteboard !IPv4 !PortNumber
- data DccClose = Close
- data DccSend
- = Send !Path !IPv4 !PortNumber !(Maybe FileOffset)
- | SendReverseServer !Path !IPv4 !FileOffset !Token
- data DccResume
- = Resume !Path !PortNumber !FileOffset
- | ResumeReverse !Path !FileOffset !Token
- data DccAccept
- = Accept !Path !PortNumber !FileOffset
- | AcceptReverse !Path !FileOffset !Token
- acceptedPosition :: DccAccept -> FileOffset
- data DccSendReverseClient = SendReverseClient !Path !IPv4 !PortNumber !FileOffset !Token
- data PathType
- data Path
- fromPath :: Path -> Path Rel File
- path :: Parser Path
- pathToBS :: Path -> ByteString
- wrap :: PathType -> ByteString -> ByteString
- newtype FileOffset = FileOffset {}
- fileOffset :: Parser FileOffset
- fileOffsetToBS :: FileOffset -> ByteString
- newtype Token = Token ByteString
- token :: Parser Token
- tokenToBS :: Token -> ByteString
- socket :: Parser (IPv4, PortNumber)
- socketToBS :: (IPv4, PortNumber) -> ByteString
- ipBigEndian :: Parser IPv4
- ipToBigEndianBS :: IPv4 -> ByteString
- fromBigEndianIp :: Integer -> IPv4
- toBigEndianIp :: IPv4 -> Integer
- tcpPort :: Parser PortNumber
- tcpPortToBS :: PortNumber -> ByteString
- decimalInRange :: (Integer, Integer) -> Parser Integer
- spaced :: Parser a -> Parser a
Documentation
class CtcpCommand a where #
CTCP commands that can be parsed and encoded
Instances
| CtcpCommand DccSendReverseClient # | |
Defined in Network.IRC.DCC.Internal Methods toCtcp :: DccSendReverseClient -> CTCPByteString # fromCtcp :: CTCPByteString -> Either String DccSendReverseClient # | |
| CtcpCommand DccAccept # | |
Defined in Network.IRC.DCC.Internal Methods toCtcp :: DccAccept -> CTCPByteString # | |
| CtcpCommand DccResume # | |
Defined in Network.IRC.DCC.Internal Methods toCtcp :: DccResume -> CTCPByteString # | |
| CtcpCommand DccSend # | |
Defined in Network.IRC.DCC.Internal | |
| CtcpCommand DccClose # | |
Defined in Network.IRC.DCC.Internal | |
| CtcpCommand DccChat # | |
Defined in Network.IRC.DCC.Internal | |
Offer DCC chat session
Constructors
| Chat !IPv4 !PortNumber | Text messages exchange DCC CHAT chat <ip> <port> |
| ChatWhiteboard !IPv4 !PortNumber | Drawing commands exchange DCC CHAT wboard <ip> <port> |
Instances
| Eq DccChat # | |
| Show DccChat # | |
| CtcpCommand DccChat # | |
Defined in Network.IRC.DCC.Internal | |
Signal intent to close DCC chat connection
Constructors
| Close | DCC CLOSE |
Instances
| Eq DccClose # | |
| Show DccClose # | |
| CtcpCommand DccClose # | |
Defined in Network.IRC.DCC.Internal | |
Offer DCC file transfer
Constructors
| Send !Path !IPv4 !PortNumber !(Maybe FileOffset) | As part of the standard DCC protocol, sent by the server DCC SEND <path> <ip> <port> (<fileSize>) |
| SendReverseServer !Path !IPv4 !FileOffset !Token | As part of the Reverse DCC protocol, sent by the server DCC SEND <path> <ip> 0 <fileSize> <token> |
Instances
| Eq DccSend # | |
| Show DccSend # | |
| CtcpCommand DccSend # | |
Defined in Network.IRC.DCC.Internal | |
Signal intent to resume DCC file transfer at specific position
Constructors
| Resume !Path !PortNumber !FileOffset | As part of the standard DCC protocol, sent by the client DCC RESUME <path> <port> <position> |
| ResumeReverse !Path !FileOffset !Token | As part of the Reverse DCC protocol, sent by the client DCC RESUME <path> 0 <position> <token> |
Instances
| Eq DccResume # | |
| Show DccResume # | |
| CtcpCommand DccResume # | |
Defined in Network.IRC.DCC.Internal Methods toCtcp :: DccResume -> CTCPByteString # | |
Signal acceptance to resume DCC file transfer at specific position
Constructors
| Accept !Path !PortNumber !FileOffset | As part of the standard DCC protocol, sent by the server DCC ACCEPT <path> <port> <position> |
| AcceptReverse !Path !FileOffset !Token | As part of the Reverse DCC protocol, sent by the server DCC ACCEPT <path> 0 <position> <token> |
Instances
| Eq DccAccept # | |
| Show DccAccept # | |
| CtcpCommand DccAccept # | |
Defined in Network.IRC.DCC.Internal Methods toCtcp :: DccAccept -> CTCPByteString # | |
acceptedPosition :: DccAccept -> FileOffset #
data DccSendReverseClient #
Tell the server to start a DCC file transfer and where it should send the data to.
Constructors
| SendReverseClient !Path !IPv4 !PortNumber !FileOffset !Token | As part of the Reverse DCC protocol, sent by the client DCC SEND <path> <ip> <port> <fileSize> <token> |
Instances
| Eq DccSendReverseClient # | |
Defined in Network.IRC.DCC.Internal Methods (==) :: DccSendReverseClient -> DccSendReverseClient -> Bool # (/=) :: DccSendReverseClient -> DccSendReverseClient -> Bool # | |
| Show DccSendReverseClient # | |
Defined in Network.IRC.DCC.Internal Methods showsPrec :: Int -> DccSendReverseClient -> ShowS # show :: DccSendReverseClient -> String # showList :: [DccSendReverseClient] -> ShowS # | |
| CtcpCommand DccSendReverseClient # | |
Defined in Network.IRC.DCC.Internal Methods toCtcp :: DccSendReverseClient -> CTCPByteString # fromCtcp :: CTCPByteString -> Either String DccSendReverseClient # | |
Constructors
| Simple | A file path without spaces |
| Quoted | A file path that can include spaces and will be quoted when serialized |
pathToBS :: Path -> ByteString #
wrap :: PathType -> ByteString -> ByteString #
newtype FileOffset #
Constructors
| FileOffset | |
Instances
fileOffsetToBS :: FileOffset -> ByteString #
An identifier for knowing which negotiation a request belongs to
Constructors
| Token ByteString |
tokenToBS :: Token -> ByteString #
socket :: Parser (IPv4, PortNumber) #
socketToBS :: (IPv4, PortNumber) -> ByteString #
ipBigEndian :: Parser IPv4 #
ipToBigEndianBS :: IPv4 -> ByteString #
fromBigEndianIp :: Integer -> IPv4 #
toBigEndianIp :: IPv4 -> Integer #
tcpPort :: Parser PortNumber #
tcpPortToBS :: PortNumber -> ByteString #