TcpLib
Loading...
Searching...
No Matches
TcpTransmitter.h
Go to the documentation of this file.
1#ifndef INC_TCPTRANSMITTER_H
2#define INC_TCPTRANSMITTER_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "TcpTypes.h"
46#include "TcpMessage.h"
47#include <queue>
48//-----------------------------------------------------------------------------
49namespace tcp
50{
51 //---------------------------------------------------------------------------
52 #ifdef _MSC_VER
53 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
54 #pragma warning( disable : 4251 )
55 /* class 'TYP' ist keine DLL-Schnittstelle und wurde als Basisklasse... */
56 #pragma warning( disable : 4275 )
57 #endif
58 //---------------------------------------------------------------------------
75 {
76 private:
77 //============== Attribute
78 //-----------------------------------------------------------------------
88 std::queue<Message *> m_MsgQueue;
89 //-----------------------------------------------------------------------
90
91 protected:
92 //============== Konstruktoren
93 //-----------------------------------------------------------------------
104 //-----------------------------------------------------------------------
105
106 public:
107 //============== Konstruktoren
108 //-----------------------------------------------------------------------
122 Transmitter( SOCKET Socket );
123 //-----------------------------------------------------------------------
133 virtual ~Transmitter();
134 //-----------------------------------------------------------------------
135
136 private:
137 //============== Copy-Konstruktor
138 //-----------------------------------------------------------------------
149 //-----------------------------------------------------------------------
150
151 protected:
152 //========== Methoden ========
153 //-----------------------------------------------------------------------
165 virtual void work() override;
166 //-----------------------------------------------------------------------
167 #if defined (__PTHREADS)
183 virtual void cleanUp();
184 //-----------------------------------------------------------------------
185 #else
186
187 public:
188 //============== Methoden
189 //------------------------------------------------------------------------
205 virtual void cancel() override;
206 //-----------------------------------------------------------------------
207 #endif
208
209 public:
210 //============== Methoden
211 //------------------------------------------------------------------------
230 int acceptOrder( Message * pTcpMessage );
231 //-----------------------------------------------------------------------
232
233 private:
234 //============== Operatoren
235 //-----------------------------------------------------------------------
245 Transmitter & operator= ( const Transmitter & );
246 //-----------------------------------------------------------------------
247 };
248 //---------------------------------------------------------------------------
249 #ifdef _MSC_VER
250 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
251 #pragma warning( default : 4251 )
252 /* class 'TYP' ist keine DLL-Schnittstelle und wurde als Basisklasse... */
253 #pragma warning( default : 4275 )
254 #endif
255 //---------------------------------------------------------------------------
256} // namespace tcp
257//-----------------------------------------------------------------------------
258#endif
Header for AbstractMessage, Message, ServerAcceptMessage and ServerMessage.
Header for ReceiverTransmitter.
For each library, here 'TcpLib' there is a type file.
#define __tcp_export_dll
Definition TcpTypes.h:59
Contains a data stream which can be sent and received by the Tcp classes.
Definition TcpMessage.h:168
Superclass for all Receiver and Transmitter, which communicate via a SOCKET.
Definition TcpReceiverTransmitter.h:104
A class that communicates with a Client or Server via a SOCKET and expects send data of type Message.
Definition TcpTransmitter.h:75
virtual void work() override
std::queue< Message * > m_MsgQueue
Definition TcpTransmitter.h:88
int acceptOrder(Message *pTcpMessage)
Transmitter(const Transmitter &)
virtual ~Transmitter()
virtual void cancel() override
Transmitter(SOCKET Socket)
Definition TcpClient.h:55