Safe Haskell | None |
---|
- data ErrorCode
- = NONE
- | SOCKET_NONE
- | BANNER_RECV
- | BANNER_SEND
- | INVALID_MAC
- | KEX_FALIURE
- | ALLOC
- | SOCKET_SEND
- | KEY_EXCHANGE_FAILURE
- | TIMEOUT
- | HOSTKEY_INIT
- | HOSTKEY_SIGN
- | DECRYPT
- | SOCKET_DISCONNECT
- | PROTO
- | PASSWORD_EXPIRED
- | FILE
- | METHOD_NONE
- | AUTHENTICATION_FAILED
- | PUBLICKEY_UNVERIFIED
- | CHANNEL_OUTOFORDER
- | CHANNEL_FAILURE
- | CHANNEL_REQUEST_DENIED
- | CHANNEL_UNKNOWN
- | CHANNEL_WINDOW_EXCEEDED
- | CHANNEL_PACKET_EXCEEDED
- | CHANNEL_CLOSED
- | CHANNEL_EOF_SENT
- | SCP_PROTOCOL
- | ZLIB
- | SOCKET_TIMEOUT
- | SFTP_PROTOCOL
- | REQUEST_DENIED
- | METHOD_NOT_SUPPORTED
- | INVAL
- | INVALID_POLL_TYPE
- | PUBLICKEY_PROTOCOL
- | EAGAIN
- | BUFFER_TOO_SMALL
- | BAD_USE
- | COMPRESS
- | OUT_OF_BOUNDARY
- | AGENT_PROTOCOL
- | SOCKET_RECV
- | ENCRYPT
- | BAD_SOCKET
- data NULL_POINTER
- class IntResult a where
- getLastError :: Session -> IO (Int, String)
- handleInt :: IntResult a => Maybe Session -> IO a -> IO a
- handleBool :: CInt -> IO Bool
- handleNullPtr :: Maybe Session -> (Ptr () -> IO a) -> IO (Ptr ()) -> IO a
- int2error :: Integral i => i -> ErrorCode
- error2int :: Num i => ErrorCode -> i
- blockedDirections :: Session -> IO [Direction]
- threadWaitSession :: Maybe Session -> IO ()
Types
Error codes returned by libssh2.
data NULL_POINTER Source
Exception to throw when null pointer received from libssh2.
Utilities
Functions
handleInt :: IntResult a => Maybe Session -> IO a -> IO aSource
Throw an exception if negative value passed, or return unchanged value.
handleBool :: CInt -> IO BoolSource
handleNullPtr :: Maybe Session -> (Ptr () -> IO a) -> IO (Ptr ()) -> IO aSource
Throw an exception if null pointer passed, or return it casted to right type.
blockedDirections :: Session -> IO [Direction]Source
Get currently blocked directions
threadWaitSession :: Maybe Session -> IO ()Source