diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-11-27 11:58:35 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-11-27 11:58:35 +0100 |
commit | 47f800495093fd7679a315e2d730fea22f6135b7 (patch) | |
tree | a7b8d3488f3841367dd03d10cae293f36fd10481 /cpp/src/Ice/TcpTransceiver.h | |
parent | Fixed SystemException to no longer derive from LocalException (diff) | |
download | ice-47f800495093fd7679a315e2d730fea22f6135b7.tar.bz2 ice-47f800495093fd7679a315e2d730fea22f6135b7.tar.xz ice-47f800495093fd7679a315e2d730fea22f6135b7.zip |
- Added support for non-blocking AMI/batch requests, connection
creation.
- Added support for AMI oneway requests.
- Changed collocation optimization to not perform any DNS lookups.
Diffstat (limited to 'cpp/src/Ice/TcpTransceiver.h')
-rw-r--r-- | cpp/src/Ice/TcpTransceiver.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/cpp/src/Ice/TcpTransceiver.h b/cpp/src/Ice/TcpTransceiver.h index fe4f78d1724..e86464df408 100644 --- a/cpp/src/Ice/TcpTransceiver.h +++ b/cpp/src/Ice/TcpTransceiver.h @@ -24,22 +24,29 @@ class TcpAcceptor; class TcpTransceiver : public Transceiver { + enum State + { + StateNeedConnect, + StateConnectPending, + StateConnected + }; + public: virtual SOCKET fd(); virtual void close(); virtual void shutdownWrite(); virtual void shutdownReadWrite(); - virtual void write(Buffer&, int); - virtual void read(Buffer&, int); + virtual bool write(Buffer&, int); + virtual bool read(Buffer&, int); virtual std::string type() const; virtual std::string toString() const; - virtual void initialize(int); + virtual SocketStatus initialize(int); virtual void checkSendSize(const Buffer&, size_t); private: - TcpTransceiver(const InstancePtr&, SOCKET); + TcpTransceiver(const InstancePtr&, SOCKET, bool); virtual ~TcpTransceiver(); friend class TcpConnector; friend class TcpAcceptor; @@ -51,8 +58,8 @@ private: SOCKET _fd; fd_set _rFdSet; fd_set _wFdSet; - - const std::string _desc; + State _state; + std::string _desc; #ifdef _WIN32 int _maxPacketSize; #endif |