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

Method setNextAddress

SRC/actor/channel/TCP_SocketSSL.cpp:460–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458
459
460int
461TCP_SocketSSL::setNextAddress(const ChannelAddress &theAddress)
462{
463 SocketAddress *theSocketAddress = 0;
464 if (theAddress.getType() == SOCKET_TYPE) {
465 theSocketAddress = (SocketAddress *)(&theAddress);
466 // check address is the only address a TCP_socket can send to
467 if (memcmp((char *) &other_Addr.addr_in, (char *) &theSocketAddress->address.addr,
468 theSocketAddress->addrLength) != 0) {
469
470 opserr << "TCP_SocketSSL::setNextAddress() - a TCP_SocketSSL ";
471 opserr << "can only communicate with one other TCP_SocketSSL\n";
472 return -1;
473 }
474 }
475 else {
476 opserr << "TCP_SocketSSL::setNextAddress() - a TCP_SocketSSL ";
477 opserr << "can only communicate with a TCP_SocketSSL";
478 opserr << " address given is not of type SocketAddress\n";
479 return -1;
480 }
481
482 return 0;
483}
484
485
486int

Callers

nothing calls this directly

Calls 1

getTypeMethod · 0.45

Tested by

no test coverage detected