Yaaf.Xmpp.Runtime


ICoreStreamApi

Defined in Yaaf.Xmpp.Runtime.dll.
Allows plugins to change the underlaying stream. So this interface abstracts away changing IXmlStream objects. Plugins will require an ICoreStreamApi in there contructors if they need this API. NOTE: BE CAREFUL WITH THIS API, THE METHODS OF THIS API CAN ONLY BE USED FROM WITHIN PLUGIN CALLS.

Instance members

Instance memberDescription
AbstractStream
Signature: IXmlStream
Modifiers: abstract
Provides an additional abstraction layered stream. When calling methods on this object they will be redirected to the latest set IXmlStream object (set by SetXmlStream method). So you can cache this. YOU SHOULD NOT USE THIS INSTANCE TO CLOSE THE STREAM, use the CloseStream and FailwithStream members instead (those make sure that closing is done properly and only once)
CloseStream()
Signature: unit -> Async<unit>
Modifiers: abstract
Closes the xml stream, and ensures that following writes throw exceptions. This does not close the underlaying streams, as it is possible that we still have to process receiving elements. The Runtime will close them as soon as everything is done.
CoreStreamHistory
Signature: IStreamManager list
Modifiers: abstract
The CoreStream history (head is the last set item)
IsClosed
Signature: bool
Modifiers: abstract
OpenStream()
Signature: unit -> Async<unit>
Modifiers: abstract
Allows plugins to get the data aquired while the stream was opened (by casting the instance to its type). Note that other StreamOpener instances may be used in the future. (there are some weird XEPs with weird headers, thats why we support this) This also allows us to skip headers in unit tests. Opens the current xmpp stream by sending headers (normally the 'stream' start elements)
SetCoreStream(arg1)
Signature: IStreamManager -> unit
Modifiers: abstract
Set a new corestream, will save the history to close all streams properly in the end. Closing will be done in reversed order as opening (when IsOpened is true and IsClosed is false), the AbstractStream property will be set accordingly
Fork me on GitHub