Navlost <racket at navlost dot eu>
This package implements core elements required by other higher-level XMPP packages.
A JID consists of a localpart, a domainpart and a resourcepart, in that order. The localpart is optional and if present, it must precede the domainpart and is separated from it by an @ sign. Likewise, the resourcepart is also optional, follows the domainpart and is separated from it by a / (slash) character. A valid JID always has at least a domainpart.
procedure
( invalid-jid )→(jid? )
This is mainly useful when populating other data structures that require jid values, before we are able to obtain a valid JID from the user.
procedure
( valid-jid? jid)→(boolean? )
jid:jid?
#t
#f
(jid "user" "example.net" "")
procedure
( bare-jid-equal? jid0jid1)→(boolean? )
jid0:jid?jid1:jid?
To compare two full JIDs for equality, use equal? .
#f
#t
#f
procedure
( jid/string? v)→(boolean? )
v:any/c
#t
#t
#t
#t
#f
procedure
( jid->string jid)→(string? )
jid:jid?
"user@example.net/resource"
procedure
( jid→string jid)→(string? )
jid:jid?
procedure
( jid/string->string v)→(string? )
This can be used to provide some flexibility when accepting inputs into procedures requiring JIDs as strings.
procedure
( jid/string→string v)→(string? )
procedure
( string->jid str)→(jid? )
(jid "user" "example.net" "resource")
procedure
( string→jid str)→(jid? )
struct
portjidpasswdi-porto-portcustodianbufferencryption))host:string?port:port-number?jid:jid?passwd:string?i-port:input-port?o-port:output-port?custodian:custodian?encryption:symbol?