Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data RconMode
- data ProtocolOptions
- data RconInfo = RconInfo {}
- data RconConnection
- defaultRcon :: RconInfo
- makeRcon :: HostName -> ServiceName -> ByteString -> RconInfo
- connect :: RconInfo -> IO RconConnection
- close :: RconConnection -> IO ()
- isConnected :: RconConnection -> IO Bool
- send :: RconConnection -> ByteString -> IO ()
- recv :: RconConnection -> IO (Either ByteString ByteString)
- recvRcon :: RconConnection -> IO ByteString
- enableLog :: RconConnection -> IO ()
- disableLog :: RconConnection -> IO ()
- setPassword :: RconConnection -> ByteString -> IO ()
- setMode :: RconConnection -> RconMode -> IO ()
- setTimeDiff :: RconConnection -> Int -> IO ()
- getPassword :: RconConnection -> IO ByteString
- getMode :: RconConnection -> IO RconMode
- getTimeDiff :: RconConnection -> IO Int
- getHost :: RconConnection -> IO HostName
- getPort :: RconConnection -> IO ServiceName
Documentation
data ProtocolOptions Source
data RconConnection Source
makeRcon :: HostName -> ServiceName -> ByteString -> RconInfo Source
Create RconInfo
for givven host, port and password
connect :: RconInfo -> IO RconConnection Source
Connect to darkplaces server
close :: RconConnection -> IO () Source
Close connection
isConnected :: RconConnection -> IO Bool Source
Return True if connection is active and False if it closed
send :: RconConnection -> ByteString -> IO () Source
Sends rcon command via RconConnection
recv :: RconConnection -> IO (Either ByteString ByteString) Source
Receive packet and tries parse it as rcon packet. If succeeds returns Right ByteString with parsed response else returns Left ByteString with raw packet
recvRcon :: RconConnection -> IO ByteString Source
Waits for rcon packet and return parsed response. if parsing fails it discard packet and waits another.
enableLog :: RconConnection -> IO () Source
Send rcon command for activating rcon log. This feature will not work over NAT
disableLog :: RconConnection -> IO () Source
Opposite action for enableLog
setPassword :: RconConnection -> ByteString -> IO () Source
setMode :: RconConnection -> RconMode -> IO () Source
setTimeDiff :: RconConnection -> Int -> IO () Source
getMode :: RconConnection -> IO RconMode Source
getTimeDiff :: RconConnection -> IO Int Source
getHost :: RconConnection -> IO HostName Source
getPort :: RconConnection -> IO ServiceName Source