![]() |
VPTissue Reference Manual
|
Base class for the XML/ptree protocols between client, server and node. More...
#include <Protocol.h>


Signals | |
| void | Ended () |
| Signal emitted when the protocol has ended and the connection is closed. | |
| void | Error (const std::string &error) |
| Signal emitted when an error occured. | |
Public Member Functions | |
| Protocol (QTcpSocket *socket, QObject *parent=nullptr) | |
| Constructor. More... | |
| Protocol (ServerInfo *server, QObject *parent=nullptr) | |
| Constructor. More... | |
| virtual | ~Protocol () |
| Destructor. | |
| bool | IsConnected () |
| Check if still connected. | |
Protected Member Functions | |
| std::string | GetClientIP () const |
| int | GetClientPort () const |
| virtual void | ReceivePtree (const boost::property_tree::ptree &pt)=0 |
| Method called when a ptree was received over the connection. | |
| void | SendPtree (const boost::property_tree::ptree &pt) |
| Sends a ptree over the connection. | |
Base class for the XML/ptree protocols between client, server and node.
Definition at line 35 of file Protocol.h.
| SimPT_Parex::Protocol::Protocol | ( | QTcpSocket * | socket, |
| QObject * | parent = nullptr |
||
| ) |
Constructor.
| socket | Use socket for the connection |
| parent | The QObject parent |
Definition at line 33 of file Protocol.cpp.
| SimPT_Parex::Protocol::Protocol | ( | ServerInfo * | server, |
| QObject * | parent = nullptr |
||
| ) |
Constructor.
| server | Use ServerInfo to connect to server |
| parent | The QObject parent |
Definition at line 43 of file Protocol.cpp.
References Ended(), Error(), SimPT_Parex::ServerInfo::GetAddress(), and SimPT_Parex::ServerInfo::GetPort().
