You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
959 B
32 lines
959 B
#ifndef __BASIC_TNSPORT_HEADERS__
|
|
#define __BASIC_TNSPORT_HEADERS__
|
|
|
|
#include <vector>
|
|
|
|
#include "basicMutex.h"
|
|
|
|
#include "basicLogCollection.h"
|
|
#include "../../data/protocol/protocol.h"
|
|
|
|
typedef std::vector<protocolParser *> parseQueue;
|
|
|
|
class basicTransport{
|
|
protected:
|
|
bool m_bConnected;
|
|
parseQueue m_vParsers;
|
|
basicMutex m_mQueueProtectorMutex;
|
|
basicMutex m_mBufferProtectorMutex;
|
|
basicLogCollection *m_pLog;
|
|
CONNECTION_STATUS m_eConnectionStatus;
|
|
public:
|
|
basicTransport();
|
|
~basicTransport();
|
|
bool addRecipient( protocolParser *ProtoParser );
|
|
virtual bool sendData(unsigned char *Data, int DataSize){ return true; };
|
|
bool getStatus( void ){ return m_eConnectionStatus == CS_CONNECTED; };
|
|
virtual bool reconnect( void ){ return false; };
|
|
void setConnectionStatus( CONNECTION_STATUS ES);
|
|
CONNECTION_STATUS getConnectionStatus( void );
|
|
};
|
|
|
|
#endif
|