- data Connection = Connection {}
- data ConnectionStatus
- data Status = Status {}
- type Log = [String]
- type Conn a = ReaderT Connection IO a
- withConnection :: Connection -> Conn a -> IO a
- readStatus :: Conn (Either String Status)
- readLog :: Conn (Either String Log)
- connectWan :: Conn ()
- disconnectWan :: Conn ()
- clearLog :: Conn ()
Documentation
Status - return the complete connection information
Status | |
|
type Conn a = ReaderT Connection IO aSource
Conn is the Reader monad over IO. It holds credentials to sequence actions with router
withConnection :: Connection -> Conn a -> IO aSource
Runs the Conn monad, logouts before exit
Connects to the WAN. Similary to disconnecting, doesn't wait for result. It is useful to check the log after some time elapsed
disconnectWan :: Conn ()Source
Send disconnect signal. Doesn't wait for response and doesn't checks the result.