GlobalObjects
Lade ...
Suche ...
Keine Treffer
TcpDataReceiver.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_TCPDATARECEIVER_H
2#define INC_TCPDATARECEIVER_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "TcpTypes.h"
45#include "TcpReceiver.h"
46
47#include "TcpMain.h"
48
49#if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
50 #include <winsock.h>
51#endif
52//-----------------------------------------------------------------------------
53namespace tcp
54{
55 //---------------------------------------------------------------------------
56 //Forwards
57 class AbstractMessage;
58 //---------------------------------------------------------------------------
85 {
86 protected:
87 //============== Attribute
88 //-----------------------------------------------------------------------
98 unsigned int m_uiDataSize;
99 //-----------------------------------------------------------------------
109 unsigned int m_uiStreamSize;
110 //-----------------------------------------------------------------------
121 //-----------------------------------------------------------------------
133 //-----------------------------------------------------------------------
148 //-----------------------------------------------------------------------
149
150 //============== Konstruktoren
151 //-----------------------------------------------------------------------
162 //-----------------------------------------------------------------------
172 DataReceiver( SOCKET );
173 //-----------------------------------------------------------------------
183 DataReceiver( TcpMain *, SOCKET );
184 //-----------------------------------------------------------------------
185
186 public:
187 //============== Konstruktoren
188 //-----------------------------------------------------------------------
206 DataReceiver( TcpMain * pParent, SOCKET Socket, unsigned int uiDataSize );
207 //-----------------------------------------------------------------------
217 virtual ~DataReceiver();
218 //-----------------------------------------------------------------------
219
220 private:
221 //============== Copy-Konstruktor
222 //-----------------------------------------------------------------------
233 //-----------------------------------------------------------------------
234
235 public:
236 //============== Methoden
237 //-----------------------------------------------------------------------
249 void setDataSize( unsigned int uiDataSize );
250 //-----------------------------------------------------------------------
262 unsigned int getDataSize() const;
263 //-----------------------------------------------------------------------
264
265 protected:
266 //============== Methoden
267 //-----------------------------------------------------------------------
278 //-----------------------------------------------------------------------
298 int processReceivedData( char * pszSentBuffer, unsigned int t_uiSentBufferSize );
299 //-----------------------------------------------------------------------
319 virtual int acceptMessage( AbstractMessage * ) = 0;
320 //-----------------------------------------------------------------------
348 virtual void generateNewTcpMessage( AbstractMessage *& prTcpAbstractMessage,
349 char * pszTransmitData,
350 unsigned int uiTransmitDataSize ) const = 0;
351 //-----------------------------------------------------------------------
382 virtual void generateNewTcpMessage( AbstractMessage *& prTcpAbstractMessage,
383 char * pszRawMsg,
384 unsigned int uiRawMsgSize,
385 unsigned int uiMessageID,
386 int iActionCode,
387 const std::string & rstrInfo ) const = 0;
388 //-----------------------------------------------------------------------
389
390 private:
391 //============== Operatoren
392 //-----------------------------------------------------------------------
402 DataReceiver & operator= ( const DataReceiver & );
403 //-----------------------------------------------------------------------
404 };
405} // namespace tcp
406//-----------------------------------------------------------------------------
407#endif
Header für TcpMain
Header für TcpReceiver.
Für jede Bibliothek, hier 'TcpLib' gibt es eine Typen-Datei.
#define __tcp_export_dll
Definition TcpTypes.h:59
Basisklasse für Nachrichten, welche von den Tcp-Klassen verschickt, empfangen und bearbeitet werden k...
Definition TcpMessage.h:97
Oberklasse für alle Receiver, welche über ein SOCKET kommunizieren und ihr Empfangsergebnis,...
Definition TcpDataReceiver.h:85
virtual void generateNewTcpMessage(AbstractMessage *&prTcpAbstractMessage, char *pszRawMsg, unsigned int uiRawMsgSize, unsigned int uiMessageID, int iActionCode, const std::string &rstrInfo) const =0
virtual void generateNewTcpMessage(AbstractMessage *&prTcpAbstractMessage, char *pszTransmitData, unsigned int uiTransmitDataSize) const =0
unsigned int m_uiDataSize
Definition TcpDataReceiver.h:98
char * m_pszSentBuffer
Definition TcpDataReceiver.h:147
DataReceiver(TcpMain *pParent, SOCKET Socket, unsigned int uiDataSize)
DataReceiver(TcpMain *, SOCKET)
virtual ~DataReceiver()
unsigned int getDataSize() const
unsigned int m_uiStreamSize
Definition TcpDataReceiver.h:109
unsigned int m_uiStreamPosistion
Definition TcpDataReceiver.h:120
DataReceiver(const DataReceiver &)
int processReceivedData(char *pszSentBuffer, unsigned int t_uiSentBufferSize)
void setDataSize(unsigned int uiDataSize)
char * m_szStreamBuffer
Definition TcpDataReceiver.h:132
virtual int acceptMessage(AbstractMessage *)=0
Oberklasse für alle TcpReceiver, welche über ein SOCKET kommunizieren und ihr Empfangsergebnis an ihr...
Definition TcpReceiver.h:85
Oberklasse für Client sowie Server, welche ihr KnowHow in den abgeleiteten Klassen 'lernt'.
Definition TcpMain.h:110
Definition TcpClient.h:55