summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/UdpTransceiver.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-10-27 12:00:32 +0100
committerBenoit Foucher <benoit@zeroc.com>2009-10-27 12:00:32 +0100
commit1fdb973182e589b0d20e987360bd694ae783b0a2 (patch)
treea94cbbcc0d078bcf7aa4427951799e09feb80826 /cpp/src/Ice/UdpTransceiver.h
parentadd support for number protocol in Python (diff)
downloadice-1fdb973182e589b0d20e987360bd694ae783b0a2.tar.bz2
ice-1fdb973182e589b0d20e987360bd694ae783b0a2.tar.xz
ice-1fdb973182e589b0d20e987360bd694ae783b0a2.zip
Cleaned up UDP transceivers, fixes for bug 4223 and 4320
Diffstat (limited to 'cpp/src/Ice/UdpTransceiver.h')
-rw-r--r--cpp/src/Ice/UdpTransceiver.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/cpp/src/Ice/UdpTransceiver.h b/cpp/src/Ice/UdpTransceiver.h
index f7c918184a8..0883c13bb39 100644
--- a/cpp/src/Ice/UdpTransceiver.h
+++ b/cpp/src/Ice/UdpTransceiver.h
@@ -35,6 +35,14 @@ class SUdpTransceiver;
class UdpTransceiver : public Transceiver, public NativeInfo
{
+ enum State
+ {
+ StateNeedConnect,
+ StateConnectPending,
+ StateConnected,
+ StateNotConnected
+ };
+
public:
virtual NativeInfoPtr getNativeInfo();
@@ -76,17 +84,19 @@ private:
const bool _incoming;
const struct sockaddr_storage _addr;
struct sockaddr_storage _mcastAddr;
-
- bool _connect;
+ struct sockaddr_storage _peerAddr;
+
+ State _state;
int _rcvSize;
int _sndSize;
- const bool _warn;
static const int _udpOverhead;
static const int _maxPacketSize;
#ifdef ICE_USE_IOCP
AsyncInfo _read;
AsyncInfo _write;
+ struct sockaddr_storage _readAddr;
+ socklen_t _readAddrLen;
#endif
};