MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / setupConnection

Method setupConnection

SRC/element/generic/GenericClient.cpp:1016–1038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1014
1015
1016int GenericClient::setupConnection()
1017{
1018 // setup the connection
1019 if (udp) {
1020 if (machineInetAddr == 0)
1021 theChannel = new UDP_Socket(port, "127.0.0.1");
1022 else
1023 theChannel = new UDP_Socket(port, machineInetAddr);
1024 }
1025#ifdef SSL
1026 else if (ssl) {
1027 if (machineInetAddr == 0)
1028 theChannel = new TCP_SocketSSL(port, "127.0.0.1");
1029 else
1030 theChannel = new TCP_SocketSSL(port, machineInetAddr);
1031 }
1032#endif
1033 else {
1034 if (machineInetAddr == 0)
1035 theChannel = new TCP_Socket(port, "127.0.0.1");
1036 else
1037 theChannel = new TCP_Socket(port, machineInetAddr);
1038 }
1039 if (!theChannel) {
1040 opserr << "GenericClient::setupConnection() "
1041 << "- failed to create channel\n";

Callers 1

updateMethod · 0.95

Calls 1

ifFunction · 0.85

Tested by

no test coverage detected