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

Method recvObj

SRC/actor/channel/TCP_SocketNoDelay.cpp:304–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304int
305TCP_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 &):

Callers

nothing calls this directly

Calls 2

getTypeMethod · 0.45
recvSelfMethod · 0.45

Tested by

no test coverage detected