MCPcopy Create free account
hub / github.com/Barracuda09/SATPI / initClientSocket

Method initClientSocket

src/decrypt/dvbapi/Client.cpp:217–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215 }
216
217 bool Client::initClientSocket(SocketClient &client, const std::string &ipAddr, int port) {
218
219 client.setupSocketStructure(ipAddr, port);
220
221 if (!client.setupSocketHandle(SOCK_STREAM /*| SOCK_NONBLOCK*/, 0)) {
222 SI_LOG_ERROR("OSCam Server handle failed");
223 return false;
224 }
225
226 client.setSocketTimeoutInSec(2);
227
228 if (!client.connectTo()) {
229 SI_LOG_ERROR("Connecting to OSCam Server failed");
230 return false;
231 }
232 return true;
233 }
234
235 void Client::sendClientInfo() {
236 std::string name = "SatPI ";

Callers

nothing calls this directly

Calls 4

setupSocketStructureMethod · 0.80
setupSocketHandleMethod · 0.80
setSocketTimeoutInSecMethod · 0.80
connectToMethod · 0.80

Tested by

no test coverage detected