network-protocol-xmpp-0.4.8: Client library for the XMPP protocol.

Safe HaskellNone
LanguageHaskell98

Network.Protocol.XMPP

Contents

Synopsis

JIDs

data JID

Constructors

JID 

Instances

data Node

Instances

data Domain

Instances

data Resource

Instances

Stanzas

class Stanza a where

Minimal complete definition

stanzaTo, stanzaFrom, stanzaID, stanzaLang, stanzaPayloads, stanzaToElement

data IQ

Constructors

IQ 

Instances

data IQType

Constructors

IQGet 
IQSet 
IQResult 
IQError 

Instances

The XMPP monad

data Server

Constructors

Server 

data Error

Constructors

AuthenticationFailure Element

The remote host refused the specified authentication credentials.

The included XML element is the error value that the server provided. It may contain additional information about why authentication failed.

AuthenticationError Text

There was an error while authenticating with the remote host.

InvalidStanza Element

An unrecognized or malformed Stanza was received from the remote host.

InvalidBindResult ReceivedStanza

The remote host sent an invalid reply to a resource bind request.

TransportError Text

There was an error with the underlying transport.

NoComponentStreamID

The remote host did not send a stream ID when accepting a component connection.

Instances

runClient

Arguments

:: Server 
-> JID

Client JID

-> Text

Username

-> Text

Password

-> XMPP a 
-> IO (Either Error a) 

runComponent

Arguments

:: Server 
-> Text

Server secret

-> XMPP a 
-> IO (Either Error a) 

putStanza :: Stanza a => a -> XMPP ()

bindJID :: JID -> XMPP JID

Send a <bind> message for the given JID, returning the server's reply. In most cases the reply will be the same as the input. However, if the input has no Resource, the returned JID will contain a generated Resource.

Clients must bind a JID before sending any Stanzas.

Resuming sessions

data Session