simplex-chat-6.5.0.7
Safe HaskellNone
LanguageHaskell2010

Simplex.Chat.Remote

Synopsis

Documentation

Desktop side

setNewRemoteHostId :: SessionSeq -> RemoteHostId -> CM () Source #

Transition session state with a RHNew ID to an assigned RemoteHostId

startRemoteHost :: Maybe (RemoteHostId, Bool) -> Maybe RCCtrlAddress -> Maybe Word16 -> CM (NonEmpty RCCtrlAddress, Maybe RemoteHostInfo, RCSignedInvitation) Source #

randomStorePath :: IO FilePath Source #

Generate a random 16-char filepath without / in it by using base64url encoding.

storeRemoteFile :: RemoteHostId -> Maybe Bool -> FilePath -> CM CryptoFile Source #

Mobile side

QR/link

connectRemoteCtrlURI :: RCSignedInvitation -> CM (Maybe RemoteCtrlInfo, CtrlAppInfo) Source #

Use provided OOB link as an annouce

Multicast

Common

connectRemoteCtrl :: RCVerifiedInvitation -> SessionSeq -> CM (Maybe RemoteCtrlInfo, CtrlAppInfo) Source #

handleRemoteCommand :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> RemoteCrypto -> TBQueue (Either ChatError ChatEvent) -> HTTP2Request -> CM' () Source #

takeRCStep :: RCStepTMVar a -> CM a Source #

type GetChunk = Int -> IO ByteString Source #

type SendChunk = Builder -> IO () Source #

type Respond = RemoteResponse -> (SbKeyNonce -> SendChunk -> IO ()) -> CM' () Source #

liftRC :: ExceptT RemoteProtocolError IO a -> CM a Source #

handleSend :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> Text -> Int -> CM' RemoteResponse Source #

handleRecv :: Int -> TBQueue (Either ChatError ChatEvent) -> IO RemoteResponse Source #

handleStoreFile :: SbKeyNonce -> FilePath -> Word32 -> FileDigest -> GetChunk -> CM' RemoteResponse Source #

verifyRemoteCtrlSession :: (ByteString -> Int -> CM' (Either ChatError ChatResponse)) -> Text -> CM RemoteCtrlInfo Source #

Take a look at emoji of tlsunique, commit pairing, and start session server

cancelActiveRemoteCtrl :: Maybe (SessionSeq, RemoteCtrlStopReason) -> CM () Source #

Stop session controller, unless session update key is present but stale

updateRemoteCtrlSession :: SessionSeq -> (RemoteCtrlSession -> Either ChatError RemoteCtrlSession) -> CM () Source #

Transition controller to a new state, unless session update key is stale

utf8String :: [Char] -> ByteString Source #