| 484 | |
| 485 | |
| 486 | int |
| 487 | TCP_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 | |
| 516 | int |