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

Copyright(c) Dmitry Astapov, 2006 ; pierre, 2007
LicenseBSD-style (see the file LICENSE)
MaintainerDmitry Astapov <dastapov@gmail.com>, pierre <k.pierre.k@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Network.XMPP.Stream

Description

An XMPP stream: means to create and use one

Synopsis

Documentation

out :: XmppMessage -> XmppStateT ()

Sends message into Stream

startM :: XmppStateT [Attribute]

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 XmppMessage

Selects next messages from stream

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

Selects next message matching predicate

xtractM :: String -> XmppStateT [XmppMessage]

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

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

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

resetStreamHandle :: (MonadIO m, MonadState Stream m) => Handle -> m ()

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

data Plugin

Constructors

Plugin