| 320 | |
| 321 | |
| 322 | int |
| 323 | UDP_Socket::sendObj(int commitTag, |
| 324 | MovableObject &theObject, ChannelAddress *theAddress) |
| 325 | { |
| 326 | // set up the address of the Socket to which data will be sent |
| 327 | if (theAddress != 0) { |
| 328 | SocketAddress *theSocketAddress = 0; |
| 329 | |
| 330 | if (theAddress->getType() == SOCKET_TYPE) { |
| 331 | theSocketAddress = (SocketAddress *)theAddress; |
| 332 | |
| 333 | bcopy((char *) &theSocketAddress->address.addr, (char *) &other_Addr.addr, |
| 334 | theSocketAddress->addrLength); |
| 335 | addrLength = theSocketAddress->addrLength; |
| 336 | } |
| 337 | else { |
| 338 | opserr << "UDP_Socket::sendObj() - a UDP_Socket "; |
| 339 | opserr << "can only communicate with a UDP_Socket"; |
| 340 | opserr << " address given is not of type SocketAddress\n"; |
| 341 | return -1; |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | return theObject.sendSelf(commitTag, *this); |
| 346 | } |
| 347 | |
| 348 | |
| 349 | int |
no test coverage detected