OutgoingAsyncBase::OutgoingAsyncBase(const InstancePtr& instance) : _instance(instance), _sentSynchronously(false), _doneInSent(false), _state(0), _os(instance.get(), Ice::currentProtocolEncoding), _is(instance.get(), Ice::currentProtocolEncoding) { }
OutgoingAsyncBase::OutgoingAsyncBase(const CommunicatorPtr& communicator, const InstancePtr& instance, const string& operation, const CallbackBasePtr& delegate, const LocalObjectPtr& cookie) : AsyncResult(communicator, instance, operation, delegate, cookie), _os(instance.get(), Ice::currentProtocolEncoding) { }
ConnectionFlushBatch::ConnectionFlushBatch(const ConnectionIPtr& connection, const CommunicatorPtr& communicator, const InstancePtr& instance, const string& operation, const CallbackBasePtr& delegate, const LocalObjectPtr& cookie) : OutgoingAsyncBase(communicator, instance, operation, delegate, cookie), _connection(connection) { _observer.attach(instance.get(), operation); }
CommunicatorFlushBatch::CommunicatorFlushBatch(const CommunicatorPtr& communicator, const InstancePtr& instance, const string& operation, const CallbackBasePtr& cb, const LocalObjectPtr& cookie) : AsyncResult(communicator, instance, operation, cb, cookie) { _observer.attach(instance.get(), operation); // // _useCount is initialized to 1 to prevent premature callbacks. // The caller must invoke ready() after all flush requests have // been initiated. // _useCount = 1; }
BatchRequestQueue::BatchRequestQueue(const InstancePtr& instance, bool datagram) : _interceptor(instance->initializationData().batchRequestInterceptor), _batchStream(instance.get(), Ice::currentProtocolEncoding), _batchStreamInUse(false), _batchStreamCanFlush(false), _batchRequestNum(0) { _batchStream.writeBlob(requestBatchHdr, sizeof(requestBatchHdr)); _batchMarker = _batchStream.b.size(); _maxSize = instance->batchAutoFlushSize(); if(_maxSize > 0 && datagram) { const Ice::InitializationData& initData = instance->initializationData(); size_t udpSndSize = initData.properties->getPropertyAsIntWithDefault("Ice.UDP.SndSize", 65535 - udpOverhead); if(udpSndSize < _maxSize) { _maxSize = udpSndSize; } } }