git-svn-id: svn://db.shs.com.ru/pip@680 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-01-20 15:24:07 +00:00
parent 6ac3c1548b
commit 8ba3d5dc8e
2 changed files with 36 additions and 9 deletions

View File

@@ -252,17 +252,19 @@ public:
const PIStringList & multicastGroups() const {return mcast_groups;}
//! Connect to TCP server with address \a readAddress(). Use only for TCP_Client
bool connect();
//! If \"threaded\" queue connect to TCP server with address \a readAddress() in
//! any \a read() or \a write() call. Otherwise connect immediate.
//! Use only for TCP_Client
bool connect(bool threaded = true);
//! Connect to TCP server with address "ip":"port". Use only for TCP_Client
bool connect(const PIString & ip, int port) {setPath(ip + PIStringAscii(":") + PIString::fromNumber(port)); return connect();}
bool connect(const PIString & ip, int port, bool threaded = true) {setPath(ip + PIStringAscii(":") + PIString::fromNumber(port)); return connect(threaded);}
//! Connect to TCP server with address "ip_port". Use only for TCP_Client
bool connect(const PIString & ip_port) {setPath(ip_port); return connect();}
bool connect(const PIString & ip_port, bool threaded = true) {setPath(ip_port); return connect(threaded);}
//! Connect to TCP server with address "addr". Use only for TCP_Client
bool connect(const Address & addr) {setPath(addr.toString()); return connect();}
bool connect(const Address & addr, bool threaded = true) {setPath(addr.toString()); return connect(threaded);}
//! Returns if %PIEthernet connected to TCP server. Use only for TCP_Client
bool isConnected() const {return connected_;}