haskell-xmpp-1.0: Haskell XMPP (eXtensible Message Passing Protocol, a.k.a. Jabber) library

Portabilityportable
Stabilityexperimental
MaintainerDmitry Astapov <dastapov@gmail.com>, pierre <k.pierre.k@gmail.com>

Network.XMPP.Stream

Description

An XMPP stream: means to create and use one

Synopsis

Documentation

out :: XmppMessage -> XmppStateT ()Source

Sends message into Stream

startM :: XmppStateT [Attribute]Source

startM is a special accessor case, since it has to retrieve only opening tag of the '<stream>' message, which encloses the whole XMPP stream. That's why it does it's own parsing, and does not rely on nextM

nextM :: XmppStateT XmppMessageSource

Selects next messages from stream

selectM :: (XmppMessage -> Bool) -> XmppStateT XmppMessageSource

Selects next message matching predicate

xtractM :: String -> XmppStateT [XmppMessage]Source

Pass in xtract query, return query result from the first message where it returns non-empty results

withNewStream :: XmppStateT a -> IO (a, Stream)Source

Convenience wrappers which allow for nicer code like: withNewStream $ do ...

data Plugin Source

Replaces contents of the Stream with the contents coming from given handle.

Constructors

Plugin 

lookupAttr :: Eq a => a -> [(a, AttValue)] -> Maybe StringSource