void ObjectInstanceDataOStream::sendMapData( NodePtr node, const uint32_t instanceID ) { _command = CMD_NODE_OBJECT_INSTANCE_MAP; _nodeID = node->getNodeID(); _instanceID = instanceID; _setupConnection( node, true /* useMulticast */ ); _resend(); _clearConnections(); }
void ObjectInstanceDataOStream::enableMap( const uint128_t& version, NodePtr node, const uint32_t instanceID ) { _command = CMD_NODE_OBJECT_INSTANCE_MAP; _nodeID = node->getNodeID(); _instanceID = instanceID; _version = version; _setupConnection( node, true /* useMulticast */ ); _enable(); }
int sendXMLToHostAndCloseFd(char* hostname, int port, xmlDocPtr xml) { int sockfd, retval = 0; sockfd = _setupConnection(hostname, port); if (sockfd <= 0) { return -1; } retval = _sendXmlToFd(sockfd, xml); close(sockfd); return retval; }
xmlDocPtr sendXMLToHostAndReturnAnswer(char* hostname, int port, xmlDocPtr xml) { int sockfd, retval = 0; xmlDocPtr retDoc = NULL; sockfd = _setupConnection(hostname, port); if (sockfd <= 0) { return NULL; } retval = _sendXmlToFd(sockfd, xml); if (retval < 0) { return NULL; } retDoc = _waitForAnswer(sockfd); return retDoc; }
void ObjectSlaveDataOStream::enableSlaveCommit( NodePtr node ) { _version = lunchbox::make_UUID(); _setupConnection( node, false /* useMulticast */ ); _enable(); }
void ObjectSlaveDataOStream::enableCommit( NodePtr node ) { _version = base::UUID( true ); _setupConnection( node, false /* useMulticast */ ); _enable(); }