GlobalObjects
Loading...
Searching...
No Matches
GloServer.h
Go to the documentation of this file.
1#ifndef INC_GLOSERVER_H
2#define INC_GLOSERVER_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include "GloTypes.h"
45#include <TcpServer.h>
46//-----------------------------------------------------------------------------
47namespace glo
48{
49 //---------------------------------------------------------------------------
50 /* Forwards */
51 struct ClientInfo;
52 class ServerThread;
53 class OrderMsg;
54 class Manager;
55 class ManagerActionVisualiser;
56 //---------------------------------------------------------------------------
71 {
72 public:
73 //-----------------------------------------------------------------------
74 // >>>>>>>>>>>>>> TcpServerReceiverTransmitter >>>>>>>>>>>>>>>>>>>>>>>>>>
75 //-----------------------------------------------------------------------
91 {
92 private:
93 //============== Attribute
94 //---------------------------------------------------------------------
113 //---------------------------------------------------------------------
114
115 protected:
116 //============== Konstruktoren
117 //---------------------------------------------------------------------
128 //---------------------------------------------------------------------
129
130 public:
131 //============== Konstruktoren
132 //---------------------------------------------------------------------
152 //---------------------------------------------------------------------
163 //---------------------------------------------------------------------
164
165 private:
166 //============== Copy-Konstruktor
167 //---------------------------------------------------------------------
178 //---------------------------------------------------------------------
179
180 public:
181 //============== Methoden
182 //---------------------------------------------------------------------
195 //---------------------------------------------------------------------
214 virtual int sendOrder( OrderMsg * pOrderMsg, tcp::ActionCode eTcpActionCode );
215 //---------------------------------------------------------------------
216
217 private:
218 //============== Operatoren
219 //---------------------------------------------------------------------
230 //---------------------------------------------------------------------
231 };
232 //-----------------------------------------------------------------------
233 // <<<<<<<<<<<<<<<< TcpServerReceiverTransmitter <<<<<<<<<<<<<<<<<<<<<<<<
234 //-----------------------------------------------------------------------
235
236 private:
237 //============== Attribute
238 //-----------------------------------------------------------------------
251 //-----------------------------------------------------------------------
252
253 protected:
254 //============== Konstruktor
255 //-----------------------------------------------------------------------
257
267 Server( unsigned int, int, int, int, int );
268 Server( unsigned int, int, int, int, unsigned int, int);
269 Server( unsigned int, int, int, int, unsigned int, unsigned long, int);
271 //-----------------------------------------------------------------------
272
273 public:
274 //============== Konstruktoren
275 //-----------------------------------------------------------------------
311 Server( const std::string & rsSchemaPath,
312 const std::vector< std::string > & rKnownSchemesVector,
313 unsigned int uiPort,
314 int iAdressFamily,
315 int iSocketType,
316 int iProtocol,
317 unsigned int uiDataSize,
318 unsigned long ulMaxClients,
319 int iSecTimeOut );
320 //-----------------------------------------------------------------------
330 virtual ~Server();
331 //-----------------------------------------------------------------------
332
333 private:
334 //============== Copy-Konstruktor
335 //-----------------------------------------------------------------------
345 Server( const Server & );
346 //-----------------------------------------------------------------------
347
348 public:
349 //============== Methoden
350 //-----------------------------------------------------------------------
362 std::string getSchemaPath() const;
363 //-----------------------------------------------------------------------
379 void getAllKnownBases( std::vector< std::string > & rKnownBasesVector ) const;
380 //-----------------------------------------------------------------------
394 void getAllClients( std::vector< ClientInfo > & rClientInfoVector ) const;
395 //-----------------------------------------------------------------------
414 void setActionVisualiser( ManagerActionVisualiser * pActionVisualiser );
415 //-----------------------------------------------------------------------
428 void setShowLevel( ShowLevel ulLevel );
429 //-----------------------------------------------------------------------
443 //-----------------------------------------------------------------------
465 virtual void processClientMessage( tcp::AbstractMessage * pTcpMessage ) override;
466 //-----------------------------------------------------------------------
467
468 protected:
469 //============== Methoden
470 //-----------------------------------------------------------------------
471 #if defined (__PTHREADS)
494 virtual void cleanUp();
495 //-----------------------------------------------------------------------
496 #else
497
498 public:
499 //============== Methoden
515 virtual void cancel() override;
516 #endif
517 //-----------------------------------------------------------------------
532 virtual void insertNewClient( Server::ServerReceiverTransmitter * pNewServerReceiverTransmitter ) override;
533 //-----------------------------------------------------------------------
550 virtual int removeClient( SOCKET nSocket ) override;
551 //-----------------------------------------------------------------------
570 SOCKET nSocket,
571 unsigned int uiDataSize ) const override;
572 //-----------------------------------------------------------------------
573
574 private:
575 //============== Operatoren
576 //-----------------------------------------------------------------------
586 Server & operator= ( const Server & );
587 //-----------------------------------------------------------------------
588 };
589 //---------------------------------------------------------------------------
590} // namespace glo
591#endif
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
Header for Server and Server::ServerReceiverTransmitter
Shows the actions of the Manager via std::cout
Definition GloManagerActionVisualiser.h:70
The object of this class is the central point of contact for actions that deal with GlobalObjects dat...
Definition GloManager.h:193
This class is used to handle the communication between the application that uses GlobalObjects and Gl...
Definition GloOrderMsg.h:84
A special ServerReceiverTransmitter for the Server. Its ServerReceiver is of the derived type TcpServ...
Definition GloServer.h:91
ServerThread * m_pServerThread
Definition GloServer.h:112
TcpServerReceiverTransmitter(tcp::Transmitter *pTransmitter, tcp::ServerReceiver *pReceiver)
virtual int sendOrder(OrderMsg *pOrderMsg, tcp::ActionCode eTcpActionCode)
TcpServerReceiverTransmitter(const TcpServerReceiverTransmitter &)
The server that communicates with Client's
Definition GloServer.h:71
std::string getSchemaPath() const
Server(const std::string &rsSchemaPath, const std::vector< std::string > &rKnownSchemesVector, unsigned int uiPort, int iAdressFamily, int iSocketType, int iProtocol, unsigned int uiDataSize, unsigned long ulMaxClients, int iSecTimeOut)
Server(unsigned int, int, int, int, int)
This constructor is not available.
void setActionVisualiser(ManagerActionVisualiser *pActionVisualiser)
void getAllKnownBases(std::vector< std::string > &rKnownBasesVector) const
Server(unsigned int, int, int, int, unsigned int, unsigned long, int)
This constructor is not available.
Server(const Server &)
void setShowLevel(ShowLevel ulLevel)
Manager * m_pGloManager
Definition GloServer.h:250
virtual void processClientMessage(tcp::AbstractMessage *pTcpMessage) override
Server()
This constructor is not available.
virtual void cancel() override
Server(unsigned int, int, int, int, unsigned int, int)
This constructor is not available.
ShowLevel getShowLevel()
void getAllClients(std::vector< ClientInfo > &rClientInfoVector) const
virtual int removeClient(SOCKET nSocket) override
virtual ~Server()
virtual void insertNewClient(Server::ServerReceiverTransmitter *pNewServerReceiverTransmitter) override
virtual tcp::Server::ServerReceiverTransmitter * generateNewServerReceiverTransmitter(tcp::Server *pParent, SOCKET nSocket, unsigned int uiDataSize) const override
An object of this class serves as interface between Manager and Base or PrivateBase.
Definition GloServerThread.h:77
Base class for messages which can be sent, received and processed by the Tcp-classes.
Definition TcpMessage.h:97
Tuple of socket Receiver and Transmitter for the Server.
Definition TcpServer.h:286
A simple TCP server class, which should learn its know-how in the derived classes.
Definition TcpServer.h:268
Class that communicates with a Client via a SOCKET and delivers its receive result of type ServerMess...
Definition TcpServerReceiver.h:81
A class that communicates with a Client or Server via a SOCKET and expects send data of type Message.
Definition TcpTransmitter.h:75
Definition GloAbstractBaseLot.h:49
unsigned long ShowLevel
Definition GloTypes.h:839
ActionCode
Definition TcpTypes.h:124