| 27 | |
| 28 | |
| 29 | ServerConnection::ServerConnection(const SocketAddress& address,const SocketManager& manager,const char* query) : address(address), _pClient(new TCPClient(manager)), _connected(false), isTarget(true), |
| 30 | _onError([this](const Exception& ex) { _ex=ex; }), |
| 31 | _onData([this](PoolBuffer& pBuffer) { return onData(pBuffer); }), |
| 32 | _onDisconnection([this](TCPClient& client, const SocketAddress&) { onDisconnection(); }) { |
| 33 | |
| 34 | if (query) |
| 35 | Util::UnpackQuery(query,_properties); |
| 36 | |
| 37 | _pClient->OnError::subscribe(_onError); |
| 38 | _pClient->OnDisconnection::subscribe(_onDisconnection); |
| 39 | _pClient->OnData::subscribe(_onData); |
| 40 | } |
| 41 | |
| 42 | ServerConnection::ServerConnection(const SocketAddress& address,SocketFile& file,const SocketManager& manager) : address(address), _pClient(new TCPClient(address,file,manager)), _connected(false), isTarget(false), |
| 43 | _onError([this](const Exception& ex) { _ex=ex; }), |
nothing calls this directly
no outgoing calls
no test coverage detected