Exceptions handling in constructor for genericSocket, created object to handle both socket descriptors upon throwing exception in constructor (as raw pointers wont get destructed automatically)

This commit is contained in:
2018-08-09 15:43:56 +02:00
parent ab7e63c20f
commit 1102153d2b
14 changed files with 309 additions and 357 deletions

View File

@ -26,21 +26,12 @@ class slsReceiverTCPIPInterface : private virtual slsReceiverDefs {
/**
* Constructor
* reads config file, creates socket, assigns function table
* @param succecc socket creation was successfull
* @param rbase pointer to the receiver base
* throws an exception in case of failure to construct
* @param pn port number (defaults to default port number)
*/
slsReceiverTCPIPInterface(int &success, UDPInterface* rbase, int pn=-1);
slsReceiverTCPIPInterface(int pn=-1);
/**
* Sets the port number to listen to.
Take care that the client must know to whcih port it has to listen to, so normally it is better to use a fixes port from the instatiation or change it from the client.
@param pn port number (-1 only get)
\returns actual port number
*/
int setPortNumber(int pn=-1);
/**
* Starts listening on the TCP port for client comminication
\returns OK or FAIL