diff options
author | Mark Spruiell <mes@zeroc.com> | 2014-03-19 12:45:55 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2014-03-19 12:45:55 -0700 |
commit | cdcffbcc3c3c052afdeb772ff0167e7a90b525bb (patch) | |
tree | 4f16ee41ef7d33394c44e9db81e4d6cd89908250 /cpp/src/Ice/ConnectionI.h | |
parent | fixing testicedist.py for 5487 (diff) | |
download | ice-cdcffbcc3c3c052afdeb772ff0167e7a90b525bb.tar.bz2 ice-cdcffbcc3c3c052afdeb772ff0167e7a90b525bb.tar.xz ice-cdcffbcc3c3c052afdeb772ff0167e7a90b525bb.zip |
merging javascript branch
Diffstat (limited to 'cpp/src/Ice/ConnectionI.h')
-rw-r--r-- | cpp/src/Ice/ConnectionI.h | 63 |
1 files changed, 12 insertions, 51 deletions
diff --git a/cpp/src/Ice/ConnectionI.h b/cpp/src/Ice/ConnectionI.h index 4252d07607f..5004046cc33 100644 --- a/cpp/src/Ice/ConnectionI.h +++ b/cpp/src/Ice/ConnectionI.h @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. @@ -72,10 +72,10 @@ class ICE_API ConnectionI : public Connection, public IceInternal::EventHandler, Observer(); - void startRead(Ice::Byte*); - void finishRead(Ice::Byte*); - void startWrite(Ice::Byte*); - void finishWrite(Ice::Byte*); + void startRead(const IceInternal::Buffer&); + void finishRead(const IceInternal::Buffer&); + void startWrite(const IceInternal::Buffer&); + void finishWrite(const IceInternal::Buffer&); void attach(const Ice::Instrumentation::ConnectionObserverPtr&); @@ -216,6 +216,7 @@ private: StateActive, StateHolding, StateClosing, + StateClosingPending, StateClosed, StateFinished }; @@ -269,61 +270,21 @@ private: bool initialize(IceInternal::SocketOperation = IceInternal::SocketOperationNone); bool validate(IceInternal::SocketOperation = IceInternal::SocketOperationNone); - void sendNextMessage(std::vector<SentCallback>&); + IceInternal::SocketOperation sendNextMessage(std::vector<SentCallback>&); IceInternal::AsyncStatus sendMessage(OutgoingMessage&); #ifndef ICE_OS_WINRT void doCompress(IceInternal::BasicStream&, IceInternal::BasicStream&); void doUncompress(IceInternal::BasicStream&, IceInternal::BasicStream&); #endif - void parseMessage(IceInternal::BasicStream&, Int&, Int&, Byte&, - IceInternal::ServantManagerPtr&, ObjectAdapterPtr&, IceInternal::OutgoingAsyncPtr&); + IceInternal::SocketOperation parseMessage(IceInternal::BasicStream&, Int&, Int&, Byte&, + IceInternal::ServantManagerPtr&, ObjectAdapterPtr&, + IceInternal::OutgoingAsyncPtr&); void invokeAll(IceInternal::BasicStream&, Int, Int, Byte, const IceInternal::ServantManagerPtr&, const ObjectAdapterPtr&); - void scheduleTimeout(IceInternal::SocketOperation status, int timeout) - { - if(timeout < 0) - { - return; - } - - try - { - if(status & IceInternal::SocketOperationRead) - { - _timer->schedule(_readTimeout, IceUtil::Time::milliSeconds(timeout)); - _readTimeoutScheduled = true; - } - if(status & (IceInternal::SocketOperationWrite | IceInternal::SocketOperationConnect)) - { - _timer->schedule(_writeTimeout, IceUtil::Time::milliSeconds(timeout)); - _writeTimeoutScheduled = true; - } - } - catch(const IceUtil::Exception&) - { - assert(false); - } - } - - void unscheduleTimeout(IceInternal::SocketOperation status) - { - if((status & IceInternal::SocketOperationRead) && _readTimeoutScheduled) - { - _timer->cancel(_readTimeout); - _readTimeoutScheduled = false; - } - if((status & (IceInternal::SocketOperationWrite | IceInternal::SocketOperationConnect)) && - _writeTimeoutScheduled) - { - _timer->cancel(_writeTimeout); - _writeTimeoutScheduled = false; - } - } - - int connectTimeout(); - int closeTimeout(); + void scheduleTimeout(IceInternal::SocketOperation status); + void unscheduleTimeout(IceInternal::SocketOperation status); Ice::ConnectionInfoPtr initConnectionInfo() const; Ice::Instrumentation::ConnectionState toConnectionState(State) const; |