20 #ifndef SGCTP_CTRANSMIT_HPP
21 #define SGCTP_CTRANSMIT_HPP
128 const unsigned char*
pullBuffer(
int _iSize );
160 virtual int recv(
int _iDescriptor,
172 virtual int send(
int _iDescriptor,
173 const void *_pBuffer,
209 virtual int alloc() = 0;
217 const CData &_roData );
235 #endif // SGCTP_CTRANSMIT_HPP
static const uint8_t PROTOCOL_VERSION
Protocol version.
virtual int serialize(int _iDescriptor, const CData &_roData)
Serialize the given SGCTP data to the given descriptor.
ETransmitType
Transmission types.
int iBufferDataEnd
Transmission buffer actual data end offset.
int iBufferSize
Transmission buffer size.
virtual int allocPayload()
Allocate resources required for payload (un-)serialization.
virtual void free()
Free resources required for data transmission (un-/serialization)
virtual int send(int _iDescriptor, const void *_pBuffer, int _iSize, int _iFlags)=0
Send data to the given descriptor.
virtual void setTimeout(int _iDescriptor, double _fdTimeout)
Set the transmission (send/receive) timeout, in seconds.
void flushBuffer()
Flush the data buffer (from pulled data)
AES128-encrypted payload.
virtual int initPayload(uint8_t _ui8tPayloadType=PAYLOAD_RAW)
Associate and initialize payload object.
double fdTimeout
Transmission timeout, in seconds.
const unsigned char * pullBuffer(int _iSize)
Pull data from the transmission buffer.
virtual EPayloadType getPayloadType()
Return the payload type.
int recvBuffer(int _iDescriptor, int _iSize)
Receive data from the given descriptor (and push them on the data buffer)
virtual bool hasPayload()
Return whether a payload object has been successfully associated/initialized.
CPayload * poPayload
Associated payload object.
Generic transmission of SGCTP payload.
EPayloadType ePayloadType
Associated payload type.
bool hasData()
Return whether data are available (in the transmission buffer)
virtual void resetPayload()
Reset (clear) the associated payload object.
virtual int alloc()=0
Allocate resources required for data transmission (un-/serialization)
virtual int recv(int _iDescriptor, void *_pBuffer, int _iSize, int _iFlags)=0
Receive data from the given descriptor.
void resetBuffer()
Reset the data buffer (clear all data)
unsigned char * pucBuffer
Transmission buffer.
virtual int unserialize(int _iDescriptor, CData *_poData, int _iMaxSize=0)
Unserialize the SGCTP data from the given descriptor.
int iBufferDataStart
Transmission buffer actual data start offset.
SGCTP transmission/payload parameters.
EPayloadType
Payload types.
virtual ETransmitType getTransmitType()=0
Return the transmission type.
virtual void freePayload()
Free resources required for payload (un-)serialization.
int allocBuffer()
Allocate resources required for data transmission.