TcpLib
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
//-----------------------------------------------------------------------------
50
namespace
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
//---------------------------------------------------------------------------
82
class
__tcp_export_dll
ServerAcceptReceiver
:
public
Receiver
83
{
84
protected
:
85
//============== Konstruktoren
86
//-----------------------------------------------------------------------
96
ServerAcceptReceiver
();
97
//-----------------------------------------------------------------------
107
ServerAcceptReceiver
( SOCKET );
108
//-----------------------------------------------------------------------
118
ServerAcceptReceiver
(
TcpMain
*, SOCKET );
119
//-----------------------------------------------------------------------
120
121
public
:
122
//============== Konstruktoren
123
//-----------------------------------------------------------------------
139
ServerAcceptReceiver
(
Server
* pParent, SOCKET Socket );
140
//-----------------------------------------------------------------------
150
virtual
~ServerAcceptReceiver
();
151
//-----------------------------------------------------------------------
152
153
private
:
154
//============== Copy-Konstruktor
155
//-----------------------------------------------------------------------
165
ServerAcceptReceiver
(
const
ServerAcceptReceiver
& );
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
//-----------------------------------------------------------------------
231
ServerAcceptReceiver
& operator= (
const
ServerAcceptReceiver
& );
232
//-----------------------------------------------------------------------
233
};
234
//---------------------------------------------------------------------------
235
}
// namespace tcp
236
//-----------------------------------------------------------------------------
237
#endif
TcpMain.h
Header for TcpMain
TcpReceiver.h
Header for Receiver.
TcpTypes.h
For each library, here 'TcpLib' there is a type file.
__tcp_export_dll
#define __tcp_export_dll
Definition
TcpTypes.h:59
tcp::Receiver
Superclass for all TcpReceiver that communicate via a SOCKET and deliver their receive result to thei...
Definition
TcpReceiver.h:85
tcp::ServerAcceptReceiver
Accept-Receiver accepts new clients and registers them with its parent object (usually a Server or a ...
Definition
TcpServerAcceptReceiver.h:83
tcp::ServerAcceptReceiver::ServerAcceptReceiver
ServerAcceptReceiver(SOCKET)
tcp::ServerAcceptReceiver::ServerAcceptReceiver
ServerAcceptReceiver(Server *pParent, SOCKET Socket)
tcp::ServerAcceptReceiver::cancel
virtual void cancel() override
tcp::ServerAcceptReceiver::ServerAcceptReceiver
ServerAcceptReceiver(const ServerAcceptReceiver &)
tcp::ServerAcceptReceiver::~ServerAcceptReceiver
virtual ~ServerAcceptReceiver()
tcp::ServerAcceptReceiver::work
virtual void work() override
tcp::ServerAcceptReceiver::ServerAcceptReceiver
ServerAcceptReceiver(TcpMain *, SOCKET)
tcp::ServerAcceptReceiver::ServerAcceptReceiver
ServerAcceptReceiver()
tcp::Server
A simple TCP server class, which should learn its know-how in the derived classes.
Definition
TcpServer.h:268
tcp::TcpMain
Superclass for Client and Server, which 'learns' its know-how in the derived classes.
Definition
TcpMain.h:110
tcp
Definition
TcpClient.h:55
winsock.h
include
TcpServerAcceptReceiver.h
Generated by
1.12.0