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

Method sendObj

SRC/actor/channel/UDP_Socket.cpp:322–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

320
321
322int
323UDP_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
349int

Callers 2

sendObjectMethod · 0.45
sendObjectMethod · 0.45

Calls 2

getTypeMethod · 0.45
sendSelfMethod · 0.45

Tested by

no test coverage detected