darkplaces-rcon-0.1: Darkplaces rcon client library

Safe HaskellNone
LanguageHaskell2010

DarkPlaces.Rcon

Synopsis

Documentation

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