simplexmq-6.5.0.16: SimpleXMQ message broker
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simplex.FileTransfer.Transport

Documentation

data XFTPClientHandshake Source #

Constructors

XFTPClientHandshake 

Fields

Instances

Instances details
Encoding XFTPClientHandshake Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPClientHandshake -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPClientHandshake Source #

smpP :: Parser XFTPClientHandshake Source #

data XFTPServerHandshake Source #

Constructors

XFTPServerHandshake 

Fields

Instances

Instances details
Encoding XFTPServerHandshake Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPServerHandshake -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPServerHandshake Source #

smpP :: Parser XFTPServerHandshake Source #

data XFTPClientHello Source #

Constructors

XFTPClientHello 

Fields

  • webChallenge :: Maybe ByteString

    a random string sent by the client to the server to prove that server has identity certificate

Instances

Instances details
Encoding XFTPClientHello Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPClientHello -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPClientHello Source #

smpP :: Parser XFTPClientHello Source #

data XFTPVersion Source #

Instances

Instances details
VersionScope XFTPVersion Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Protocol XFTPVersion XFTPErrorType FileResponse Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type ProtoCommand FileResponse = (cmd :: Type) Source #

type ProtoType FileResponse = (sch :: ProtocolType) Source #

ProtocolEncoding XFTPVersion XFTPErrorType FileCmd Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type Tag FileCmd Source #

ProtocolEncoding XFTPVersion XFTPErrorType FileResponse Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type Tag FileResponse Source #

FilePartyI p => ProtocolEncoding XFTPVersion XFTPErrorType (FileCommand p) Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type Tag (FileCommand p) Source #

pattern VersionXFTP :: Word16 -> VersionXFTP Source #

data XFTPErrorType Source #

Constructors

BLOCK

incorrect block format, encoding or signature size

SESSION

incorrect SMP session ID (TLS Finished message / tls-unique binding RFC5929)

HANDSHAKE

incorrect handshake command

CMD

SMP command is unknown or has invalid syntax

Fields

AUTH

command authorization error - bad signature or non-existing SMP queue

BLOCKED

command with the entity that was blocked

SIZE

incorrent file size

QUOTA

storage quota exceeded

DIGEST

incorrent file digest

CRYPTO

file encryption/decryption failed

NO_FILE

no expected file body in request/response or no file on the server

HAS_FILE

unexpected file body

FILE_IO

file IO error

TIMEOUT

file sending or receiving timeout

INTERNAL

internal server error

DUPLICATE_

used internally, never returned by the server (to be removed)

Instances

Instances details
FromJSON XFTPErrorType Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

parseJSON :: Value -> Parser XFTPErrorType

parseJSONList :: Value -> Parser [XFTPErrorType]

omittedField :: Maybe XFTPErrorType

ToJSON XFTPErrorType Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

toJSON :: XFTPErrorType -> Value

toEncoding :: XFTPErrorType -> Encoding

toJSONList :: [XFTPErrorType] -> Value

toEncodingList :: [XFTPErrorType] -> Encoding

omitField :: XFTPErrorType -> Bool

Show XFTPErrorType Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

showsPrec :: Int -> XFTPErrorType -> ShowS

show :: XFTPErrorType -> String

showList :: [XFTPErrorType] -> ShowS

Eq XFTPErrorType Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Encoding XFTPErrorType Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

smpEncode :: XFTPErrorType -> ByteString Source #

smpDecode :: ByteString -> Either String XFTPErrorType Source #

smpP :: Parser XFTPErrorType Source #

StrEncoding XFTPErrorType Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

strEncode :: XFTPErrorType -> ByteString Source #

strDecode :: ByteString -> Either String XFTPErrorType Source #

strP :: Parser XFTPErrorType Source #

Protocol XFTPVersion XFTPErrorType FileResponse Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type ProtoCommand FileResponse = (cmd :: Type) Source #

type ProtoType FileResponse = (sch :: ProtocolType) Source #

ProtocolEncoding XFTPVersion XFTPErrorType FileCmd Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type Tag FileCmd Source #

ProtocolEncoding XFTPVersion XFTPErrorType FileResponse Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type Tag FileResponse Source #

FilePartyI p => ProtocolEncoding XFTPVersion XFTPErrorType (FileCommand p) Source # 
Instance details

Defined in Simplex.FileTransfer.Protocol

Associated Types

type Tag (FileCommand p) Source #

data XFTPRcvChunkSpec Source #

Constructors

XFTPRcvChunkSpec 

Fields

Instances

Instances details
Show XFTPRcvChunkSpec Source # 
Instance details

Defined in Simplex.FileTransfer.Transport

Methods

showsPrec :: Int -> XFTPRcvChunkSpec -> ShowS

show :: XFTPRcvChunkSpec -> String

showList :: [XFTPRcvChunkSpec] -> ShowS

receiveFile :: (Int -> IO ByteString) -> XFTPRcvChunkSpec -> ExceptT XFTPErrorType IO () Source #

sendEncFile :: Handle -> (Builder -> IO ()) -> SbState -> Word32 -> IO () Source #

receiveEncFile :: (Int -> IO ByteString) -> SbState -> XFTPRcvChunkSpec -> ExceptT XFTPErrorType IO () Source #

receiveSbFile :: (Int -> IO ByteString) -> Handle -> SbState -> Word32 -> IO (Either ReceiveFileError ()) Source #