GlobalObjects
Loading...
Searching...
No Matches
TcpServerAcceptReceiver.h
Go to the documentation of this file.
1#ifndef INC_TCPSERVERACCEPTRECEIVER_H
2#define INC_TCPSERVERACCEPTRECEIVER_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "TcpTypes.h"
45#include "TcpReceiver.h"
46
47#include "TcpMain.h"
48#include <queue>
49//-----------------------------------------------------------------------------
50namespace tcp
51{
52 //---------------------------------------------------------------------------
53 #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
54 #include <winsock.h>
55 #endif
56 //---------------------------------------------------------------------------
57 //Forwards
58 class Server;
59 //---------------------------------------------------------------------------
60 #ifdef _MSC_VER
61 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
62 #pragma warning( disable : 4251 )
63 /* class 'TYP' ist keine DLL-Schnittstelle und wurde als Basisklasse... */
64 #pragma warning( disable : 4275 )
65 #endif
66 //---------------------------------------------------------------------------
83 {
84 protected:
85 //============== Konstruktoren
86 //-----------------------------------------------------------------------
97 //-----------------------------------------------------------------------
108 //-----------------------------------------------------------------------
119 //-----------------------------------------------------------------------
120
121 public:
122 //============== Konstruktoren
123 //-----------------------------------------------------------------------
139 ServerAcceptReceiver( Server * pParent, SOCKET Socket );
140 //-----------------------------------------------------------------------
151 //-----------------------------------------------------------------------
152
153 private:
154 //============== Copy-Konstruktor
155 //-----------------------------------------------------------------------
166 //-----------------------------------------------------------------------
167
168 protected:
169 //========== Methoden ========
170 //-----------------------------------------------------------------------
180 virtual void work() override;
181 //-----------------------------------------------------------------------
182 #if defined (__PTHREADS)
196 virtual void cleanUp();
197 //-----------------------------------------------------------------------
198 #endif
199
200 public:
201 //========== Methoden ========
202 //-----------------------------------------------------------------------
212 #if defined (__PTHREADS)
213 virtual int cancel();
214 #else
215 virtual void cancel() override;
216 #endif
217 //-----------------------------------------------------------------------
218
219 private:
220 //============== Operatoren
221 //-----------------------------------------------------------------------
232 //-----------------------------------------------------------------------
233 };
234 //---------------------------------------------------------------------------
235} // namespace tcp
236//-----------------------------------------------------------------------------
237#endif
Header for TcpMain
Header for Receiver.
For each library, here 'TcpLib' there is a type file.
#define __tcp_export_dll
Definition TcpTypes.h:59
Superclass for all TcpReceiver that communicate via a SOCKET and deliver their receive result to thei...
Definition TcpReceiver.h:85
Accept-Receiver accepts new clients and registers them with its parent object (usually a Server or a ...
Definition TcpServerAcceptReceiver.h:83
ServerAcceptReceiver(Server *pParent, SOCKET Socket)
virtual void cancel() override
ServerAcceptReceiver(const ServerAcceptReceiver &)
virtual void work() override
ServerAcceptReceiver(TcpMain *, SOCKET)
A simple TCP server class, which should learn its know-how in the derived classes.
Definition TcpServer.h:268
Superclass for Client and Server, which 'learns' its know-how in the derived classes.
Definition TcpMain.h:110
Definition TcpClient.h:55