XMPP configuration form

Currently relies on SRV being set, or the JID's hostname being the server
hostname and the port being default. Future work: Allow manual
configuration of user name, hostname, and port.
This commit is contained in:
Joey Hess 2012-10-26 14:17:09 -04:00
parent a11fb94c65
commit 07494cbb4b
8 changed files with 130 additions and 16 deletions

View file

@ -33,12 +33,13 @@ import Data.Either
#endif
newtype SRV = SRV String
deriving (Show, Eq)
type HostPort = (HostName, PortID)
mkSRV :: String -> String -> HostName -> SRV
mkSRV transport protocol host = SRV $ concat
["_", protocol, ".", transport, ".", host]
["_", protocol, "._", transport, ".", host]
mkSRVTcp :: String -> HostName -> SRV
mkSRVTcp = mkSRV "tcp"