|
GlobalObjects
|
The server that communicates with Client's More...
#include <GloServer.h>

Classes | |
| class | TcpServerReceiverTransmitter |
| A special ServerReceiverTransmitter for the Server. Its ServerReceiver is of the derived type TcpServerReceiver and this can send orders. More... | |
Public Member Functions | |
| 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) | |
| virtual | ~Server () |
| virtual void | cancel () override |
| virtual tcp::Server::ServerReceiverTransmitter * | generateNewServerReceiverTransmitter (tcp::Server *pParent, SOCKET nSocket, unsigned int uiDataSize) const override |
| void | getAllClients (std::vector< ClientInfo > &rClientInfoVector) const |
| void | getAllKnownBases (std::vector< std::string > &rKnownBasesVector) const |
| std::string | getSchemaPath () const |
| ShowLevel | getShowLevel () |
| virtual void | insertNewClient (Server::ServerReceiverTransmitter *pNewServerReceiverTransmitter) override |
| virtual void | processClientMessage (tcp::AbstractMessage *pTcpMessage) override |
| virtual int | removeClient (SOCKET nSocket) override |
| void | setActionVisualiser (ManagerActionVisualiser *pActionVisualiser) |
| void | setShowLevel (ShowLevel ulLevel) |
Public Member Functions inherited from tcp::Server | |
| Server (unsigned int uiPort, int iAdressFamily, int iSocketType, int iProtocol, unsigned int uiDataSize, unsigned long ulMaxClients, int iSecTimeOut) | |
| int | acceptClientMessage (AbstractMessage *pTcpMessage) |
Public Member Functions inherited from tcp::TcpMain | |
| TcpMain (unsigned int uiPort, int iAdressFamily, int iSocketType, int iProtocol, int iSecTimeOut) | |
| TcpMain (unsigned int uiPort, int iAdressFamily, int iSocketType, int iProtocol, unsigned int uiDataSize, int iSecTimeOut) | |
| virtual | ~TcpMain () |
| unsigned int | getDataSize () const |
| SOCKET | getMainSocket () const |
| unsigned int | getPortNum () const |
| virtual void | setDataSize (unsigned int uiDataSize) |
| void | setTimeOutSec (int iSecTimeOut) |
| int | TimeOutSec () |
Public Member Functions inherited from eut::RepeatingThread | |
| RepeatingThread () | |
| virtual | ~RepeatingThread () |
| virtual void | finishBreak () |
| int | getBreakCounter () |
| bool | isInExclusiveAccess () const |
| void | setExclusiveAccess () |
| void | signalInput () |
| virtual int | start () |
| RepeatingThread::STATUS | status () const |
| virtual void | takeABreak () |
| bool | testCancel () |
| void | unsetExclusiveAccess () |
| void | waitForInput () |
Protected Member Functions | |
| Server () | |
| This constructor is not available. | |
| Server (unsigned int, int, int, int, int) | |
| This constructor is not available. | |
| Server (unsigned int, int, int, int, unsigned int, int) | |
| This constructor is not available. | |
| Server (unsigned int, int, int, int, unsigned int, unsigned long, int) | |
| This constructor is not available. | |
Protected Member Functions inherited from tcp::Server | |
| Server () | |
| Server (unsigned int, int, int, int, int) | |
| Server (unsigned int, int, int, int, unsigned int, int) | |
| void | clearClientMap () |
| Server::ServerReceiverTransmitter * | getClient (SOCKET Socket) |
| unsigned long | getMaxClients () const |
| virtual int | send (Message *pTcpMessage) override |
| virtual int | send (SOCKET ClientSocket, char *pszRawMsg, unsigned int uiRawMsgSize, unsigned int uiMessageID=0, int iActionCode=0, const std::string &rstrInfo="") |
| void | setClientMapReceiverValid (bool bValid) |
| virtual void | work () override |
Protected Member Functions inherited from tcp::TcpMain | |
| TcpMain () | |
| void | setWSACleanup () const |
| int | startWinsock () const |
Protected Member Functions inherited from eut::RepeatingThread | |
| ORDER | getOrder () |
| STATUS | getStatus () |
| void | setStatus (STATUS eStatus) |
| void | threadWork () |
| void | toOrder (ORDER eOrder) |
Private Member Functions | |
| Server (const Server &) | |
| Server & | operator= (const Server &) |
Private Attributes | |
| Manager * | m_pGloManager |
Additional Inherited Members | |
Public Types inherited from eut::RepeatingThread | |
| enum | EuTHREADERROR { EuTHREAD_ERR_NO_THREAD = -10301 , EuTHREAD_ERR_THREAD_ALREADY_WORKING = -10302 , EuTHREAD_ERR_THREAD_BREAK_COUNT_LESS_THAN_ZERO = -10303 , EuTHREAD_ERR_UNKNOWN = -10400 } |
| Error range = -10301 to -10400 More... | |
| enum | ORDER { eUNDEFINED , eDO_WORK , eEXIT } |
| enum | STATUS { eAT_THE_START , eWORKING , ePAUSING , eENDING , eCOMPLETED } |
Public Attributes inherited from eut::RepeatingThread | |
| std::string | m_strDebugInfo |
Protected Attributes inherited from tcp::Server | |
| std::map< SOCKET, ServerReceiverTransmitter *, std::less< SOCKET > > | m_ClientMap |
| ServerAcceptReceiver * | m_pAcceptReceiver |
Protected Attributes inherited from tcp::TcpMain | |
| int | m_iAdressFamily |
| int | m_iProtocol |
| int | m_iSecTimeOut |
| int | m_iSocketType |
| SOCKET | m_MainSocket |
| unsigned int | m_uiDataSize |
| unsigned int | m_uiServerPort |
The server that communicates with Client's
|
protected |
This constructor is not available.
Referenced by Server(), and operator=().
|
protected |
This constructor is not available.
|
protected |
This constructor is not available.
|
protected |
This constructor is not available.
| glo::Server::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 ) |
The constructor starts the server.
| [in] | rsSchemaPath | The directory where the schemas for the Manager are located. |
| [in] | rKnownSchemesVector | The known schemas for the Manager. |
| [in] | uiPort | The port of the server. |
| [in] | iAdressFamily | The socket address family to instantiate a socket (usually AF_INET). |
| [in] | iSocketType | The socket type (usually SOCK_STREAM). |
| [in] | iProtocol | The socket protocol (usually 0). |
| [in] | uiDataSize | The packet size. |
| [in] | ulMaxClients | The maximum number of clients allowed to connect. |
| [in] | iSecTimeOut | The time until waiting for a connection or waiting for data is aborted. |
| eut::ErrorNException | An exception is thrown if an error occurs. |
|
virtual |
Destructor.
Reimplemented from tcp::Server.
|
private |
The copy constructor is not available.
References Server().
|
overridevirtual |
When the thread ends, this virtual method is called. The MsgQueue is cleaned up here.
Reimplemented from tcp::Server.
|
overridevirtual |
Returns here a TcpServerReceiverTransmitter with tcp::Transmitter and TcpServerReceiver.
| [in] | pParent | Server or subclass. |
| [in] | nSocket | Socket of the new client. |
| [in] | uiDataSize | The Packet Size. |
Reimplemented from tcp::Server.
| void glo::Server::getAllClients | ( | std::vector< ClientInfo > & | rClientInfoVector | ) | const |
Returns all connected clients.
| [in,out] | rClientInfoVector | The registered clients with their communicator ID and the name of the open database. |
| void glo::Server::getAllKnownBases | ( | std::vector< std::string > & | rKnownBasesVector | ) | const |
Copies the names of all known schemas or databases into the transferred Vector.
| [in,out] | rKnownBasesVector | The names of all known schemas or databases. |
| std::string glo::Server::getSchemaPath | ( | ) | const |
Returns the file path where the schema file can be found.
| ShowLevel glo::Server::getShowLevel | ( | ) |
Returns the current display level in the Manager.
|
overridevirtual |
First calls the same method in the superclass. If successful, the Manager is informed that a new client has connected to the Server.
| [in] | pNewServerReceiverTransmitter | The new client socket is in this object. |
Reimplemented from tcp::Server.
The assignment operator is not available.
References Server().
|
overridevirtual |
Lets the Manager show what kind of TCP message was received and then passes it to subclass methods with the same name.
If a ServerMessage was passed and its ActionCode == ERR_WRONG_STREAMTYPE the socket of the ServerMessage is closed see ServerMessage::closeSocket() ).
| [in] | pTcpMessage | The message to be processed by the client. |
Reimplemented from tcp::Server.
|
overridevirtual |
First calls the same method in the superclass. If successful, the Manager is informed that a client has logged off the Server.
| [in] | nSocket | The socket of the client which should be logged off. |
Reimplemented from tcp::Server.
| void glo::Server::setActionVisualiser | ( | ManagerActionVisualiser * | pActionVisualiser | ) |
Sets the action visualizer in Manager.
| [in] | pActionVisualiser | The action visualiser. |
| void glo::Server::setShowLevel | ( | ShowLevel | ulLevel | ) |
Sets the display level in Manager.
| [in] | ulLevel | The display level. |
|
private |
Is referenced here to pass an action visualizer and display the TCP actions (if so set).