diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-06-07 17:01:30 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-06-07 17:01:30 +0000 |
commit | a737fcdae3a825d1a3df353a08df3c12285cde43 (patch) | |
tree | ce5c2f7aed6194cb4d94cb07e00b7380bc320e7b /cpp/src/Ice/UdpConnector.h | |
parent | Added missing IComparable (diff) | |
download | ice-a737fcdae3a825d1a3df353a08df3c12285cde43.tar.bz2 ice-a737fcdae3a825d1a3df353a08df3c12285cde43.tar.xz ice-a737fcdae3a825d1a3df353a08df3c12285cde43.zip |
More changes for bug 1996
Diffstat (limited to 'cpp/src/Ice/UdpConnector.h')
-rw-r--r-- | cpp/src/Ice/UdpConnector.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/cpp/src/Ice/UdpConnector.h b/cpp/src/Ice/UdpConnector.h new file mode 100644 index 00000000000..95a1438ed89 --- /dev/null +++ b/cpp/src/Ice/UdpConnector.h @@ -0,0 +1,58 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2007 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. +// +// ********************************************************************** + +#ifndef ICE_UDP_CONNECTOR_H +#define ICE_UDP_CONNECTOR_H + +#include <Ice/TransceiverF.h> +#include <Ice/InstanceF.h> +#include <Ice/Connector.h> + +#ifdef _WIN32 +# include <winsock2.h> +#else +# include <netinet/in.h> // For struct sockaddr_in +#endif + +namespace IceInternal +{ + +class UdpConnector : public Connector +{ +public: + + virtual TransceiverPtr connect(int); + virtual Ice::Short type() const; + virtual std::string toString() const; + + virtual bool operator==(const Connector&) const; + virtual bool operator!=(const Connector&) const; + virtual bool operator<(const Connector&) const; + +private: + + UdpConnector(const InstancePtr&, const struct sockaddr_in&, const std::string&, int, Ice::Byte, Ice::Byte, + Ice::Byte, Ice::Byte, const std::string&); + virtual ~UdpConnector(); + friend class UdpEndpointI; + + const InstancePtr _instance; + struct sockaddr_in _addr; + const std::string _mcastInterface; + const int _mcastTtl; + const Ice::Byte _protocolMajor; + const Ice::Byte _protocolMinor; + const Ice::Byte _encodingMajor; + const Ice::Byte _encodingMinor; + const std::string _connectionId; +}; + +} + +#endif |