Пример #1
0
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();
}
Пример #2
0
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();
}
Пример #3
0
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;
}
Пример #4
0
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;
}
Пример #5
0
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();
}