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

Method sendObj

SRC/actor/channel/TCP_SocketSSL.cpp:486–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484
485
486int
487TCP_SocketSSL::sendObj(int commitTag,
488 MovableObject &theObject, ChannelAddress *theAddress)
489{
490 // first check address is the only address a TCP_socket can send to
491 SocketAddress *theSocketAddress = 0;
492 if (theAddress != 0) {
493 if (theAddress->getType() == SOCKET_TYPE)
494 theSocketAddress = (SocketAddress *)theAddress;
495 else {
496 opserr << "TCP_SocketSSL::sendObj() - a TCP_SocketSSL ";
497 opserr << "can only communicate with a TCP_SocketSSL";
498 opserr << " address given is not of type SocketAddress\n";
499 return -1;
500 }
501
502 if (memcmp((char *) &other_Addr.addr_in, (char *) &theSocketAddress->address.addr,
503 theSocketAddress->addrLength) != 0) {
504
505 opserr << "TCP_SocketSSL::sendObj() - a TCP_SocketSSL ";
506 opserr << "can only communicate with one other TCP_SocketSSL";
507 opserr << " address given is not that address\n";
508 return -1;
509 }
510 }
511
512 return theObject.sendSelf(commitTag, *this);
513}
514
515
516int

Callers

nothing calls this directly

Calls 2

getTypeMethod · 0.45
sendSelfMethod · 0.45

Tested by

no test coverage detected