gloox  1.0.20
Public Member Functions | List of all members
BytestreamDataHandler Class Referenceabstract

#include <bytestreamdatahandler.h>

Public Member Functions

virtual ~BytestreamDataHandler ()
 
virtual void handleBytestreamData (Bytestream *bs, const std::string &data)=0
 
virtual void handleBytestreamDataAck (Bytestream *bs)
 
virtual void handleBytestreamError (Bytestream *bs, const IQ &iq)=0
 
virtual void handleBytestreamOpen (Bytestream *bs)=0
 
virtual void handleBytestreamClose (Bytestream *bs)=0
 

Detailed Description

A virtual interface that allows implementors to receive data sent over a SOCKS5 Bytestream as defined in XEP-0066, or an In-Band Bytestream as defined in XEP-0047. You'll also need it for sending of data.

An BytestreamDataHandler is registered with a Bytestream.

See SIProfileFT for more information regarding file transfer.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0

Definition at line 39 of file bytestreamdatahandler.h.

Constructor & Destructor Documentation

◆ ~BytestreamDataHandler()

virtual ~BytestreamDataHandler ( )
inlinevirtual

Virtual destructor.

Definition at line 45 of file bytestreamdatahandler.h.

Member Function Documentation

◆ handleBytestreamClose()

virtual void handleBytestreamClose ( Bytestream bs)
pure virtual

Notifies the handler that the given bytestream has been closed.

Parameters
bsThe closed bytestream.

◆ handleBytestreamData()

virtual void handleBytestreamData ( Bytestream bs,
const std::string &  data 
)
pure virtual

Reimplement this function to receive data which is sent over the bytestream. The data received here is (probably) only a single chunk of the complete data (depending on the amount of data you want to send).

Parameters
bsThe bytestream.
dataThe actual stream payload.

◆ handleBytestreamDataAck()

virtual void handleBytestreamDataAck ( Bytestream bs)
inlinevirtual

Reimplement this function to be notified when the remote end has received and acknowledged a single data packet. This packet may be smaller than the chunk that was fed into Bytream::send() due to internal chunk size limits. so this callback may be called multiple times for each call to Bytestream::send(). it can be used to implement burst limits.

Parameters
bsThe bytestream.
Since
1.0.20

Definition at line 65 of file bytestreamdatahandler.h.

◆ handleBytestreamError()

virtual void handleBytestreamError ( Bytestream bs,
const IQ iq 
)
pure virtual

Notifies about an error occuring while using a bytestream. When this handler is called the stream has already been closed.

Parameters
bsThe bytestream.
iqThe error stanza.

◆ handleBytestreamOpen()

virtual void handleBytestreamOpen ( Bytestream bs)
pure virtual

Notifies the handler that the given bytestream has been acknowledged and is ready to send/receive data.

Parameters
bsThe opened bytestream.

The documentation for this class was generated from the following file: