Browse Source

Provide access to StanzaID generator in Network.Xmpp (`newStanzaID')

Fixes #22.
master
Jon Kristensen 13 years ago
parent
commit
8f00c6f7d9
  1. 1
      source/Network/Xmpp.hs
  2. 5
      source/Network/Xmpp/Concurrent.hs

1
source/Network/Xmpp.hs

@ -83,6 +83,7 @@ module Network.Xmpp
-- or IQ stanza. -- or IQ stanza.
, getStanza , getStanza
, getStanzaChan , getStanzaChan
, newStanzaID
-- ** Messages -- ** Messages
-- | The /message/ stanza is a /push/ mechanism whereby one entity -- | The /message/ stanza is a /push/ mechanism whereby one entity
-- pushes information to another entity, similar to the communications that -- pushes information to another entity, similar to the communications that

5
source/Network/Xmpp/Concurrent.hs

@ -12,6 +12,7 @@ module Network.Xmpp.Concurrent
, newSession , newSession
, writeWorker , writeWorker
, session , session
, newStanzaID
) where ) where
import Control.Applicative((<$>),(<*>)) import Control.Applicative((<$>),(<*>))
@ -182,3 +183,7 @@ session realm mbSasl config = runErrorT $ do
ses <- ErrorT $ newSession stream config ses <- ErrorT $ newSession stream config
liftIO $ when (enableRoster config) $ initRoster ses liftIO $ when (enableRoster config) $ initRoster ses
return ses return ses
newStanzaID :: Session -> IO StanzaID
newStanzaID = idGenerator

Loading…
Cancel
Save