| 302 | } |
| 303 | |
| 304 | int |
| 305 | TCP_SocketNoDelay::recvObj(MovableObject &theObject, |
| 306 | FEM_ObjectBroker &theBroker, |
| 307 | ChannelAddress *theAddress) |
| 308 | { |
| 309 | // first check address is the only address a TCP_SocketNoDelay can send to |
| 310 | SocketAddress *theSocketAddress = 0; |
| 311 | if (theAddress != 0) { |
| 312 | if (theAddress->getType() == SOCKET_TYPE) |
| 313 | theSocketAddress = (SocketAddress *)theAddress; |
| 314 | else { |
| 315 | opserr << "TCP_SocketNoDelay::sendObj() - a TCP_SocketNoDelay "; |
| 316 | opserr << "can only communicate with a TCP_SocketNoDelay"; |
| 317 | opserr << " address given is not of type SocketAddress\n"; |
| 318 | return -1; |
| 319 | } |
| 320 | if (memcmp((char *) &other_Addr, (char *) &theSocketAddress->addr, |
| 321 | theSocketAddress->addrLength) != 0) { |
| 322 | |
| 323 | opserr << "TCP_SocketNoDelay::recvMsg() - a TCP_SocketNoDelay "; |
| 324 | opserr << "can only communicate with one other TCP_SocketNoDelay\n"; |
| 325 | return -1; |
| 326 | } |
| 327 | } |
| 328 | return theObject.recvSelf(*this, theBroker); |
| 329 | } |
| 330 | |
| 331 | |
| 332 | // void Recv(Message &): |