diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-08-21 15:55:01 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-08-21 15:55:01 +0200 |
commit | b9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a (patch) | |
tree | 183215e2dbeadfbc871b800ce09726e58af38b91 /cpp/src/Ice/TcpTransceiver.h | |
parent | adding compression cookbook demo (diff) | |
download | ice-b9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a.tar.bz2 ice-b9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a.tar.xz ice-b9f2fa14fb3f222a6ec5e0a93bf25fe5ad12b56a.zip |
IOCP changes, bug 3501, 4200, 4156, 3101
Diffstat (limited to 'cpp/src/Ice/TcpTransceiver.h')
-rw-r--r-- | cpp/src/Ice/TcpTransceiver.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/cpp/src/Ice/TcpTransceiver.h b/cpp/src/Ice/TcpTransceiver.h index 36077057d7b..7c1c80c94b7 100644 --- a/cpp/src/Ice/TcpTransceiver.h +++ b/cpp/src/Ice/TcpTransceiver.h @@ -22,7 +22,7 @@ namespace IceInternal class TcpConnector; class TcpAcceptor; -class TcpTransceiver : public Transceiver +class TcpTransceiver : public Transceiver, public NativeInfo { enum State { @@ -33,19 +33,32 @@ class TcpTransceiver : public Transceiver public: - virtual SOCKET fd(); + virtual NativeInfoPtr getNativeInfo(); +#ifdef ICE_USE_IOCP + virtual AsyncInfo* getAsyncInfo(SocketOperation); +#endif + + virtual SocketOperation initialize(); virtual void close(); virtual bool write(Buffer&); virtual bool read(Buffer&); +#ifdef ICE_USE_IOCP + virtual void startWrite(Buffer&); + virtual void finishWrite(Buffer&); + virtual void startRead(Buffer&); + virtual void finishRead(Buffer&); +#endif virtual std::string type() const; virtual std::string toString() const; - virtual SocketStatus initialize(); virtual void checkSendSize(const Buffer&, size_t); private: TcpTransceiver(const InstancePtr&, SOCKET, bool); virtual ~TcpTransceiver(); + + void connect(const struct sockaddr_storage&); + friend class TcpConnector; friend class TcpAcceptor; @@ -53,11 +66,14 @@ private: const Ice::LoggerPtr _logger; const Ice::StatsPtr _stats; - SOCKET _fd; State _state; std::string _desc; -#ifdef _WIN32 - int _maxPacketSize; +#ifdef ICE_USE_IOCP + struct sockaddr_storage _connectAddr; + AsyncInfo _read; + AsyncInfo _write; + int _maxSendPacketSize; + int _maxReceivePacketSize; #endif }; |