summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/SUdpClient.cpp
diff options
context:
space:
mode:
authorAnthony Neal <aneal@zeroc.com>2002-01-21 18:25:23 +0000
committerAnthony Neal <aneal@zeroc.com>2002-01-21 18:25:23 +0000
commitaf55fcdcfb0857a3516f30fb61176ffe9bc31110 (patch)
treed92b8bd808ab3f6420e2733295024d1fbf6a1d7b /cpp/src/Ice/SUdpClient.cpp
parentadding server; removing wstring (diff)
downloadice-af55fcdcfb0857a3516f30fb61176ffe9bc31110.tar.bz2
ice-af55fcdcfb0857a3516f30fb61176ffe9bc31110.tar.xz
ice-af55fcdcfb0857a3516f30fb61176ffe9bc31110.zip
Update of SUDP (Secure UDP) related code. SUDP is still not active, but
compiles as is under Linux and Windows.
Diffstat (limited to 'cpp/src/Ice/SUdpClient.cpp')
-rw-r--r--cpp/src/Ice/SUdpClient.cpp83
1 files changed, 83 insertions, 0 deletions
diff --git a/cpp/src/Ice/SUdpClient.cpp b/cpp/src/Ice/SUdpClient.cpp
new file mode 100644
index 00000000000..cd6fe898fe5
--- /dev/null
+++ b/cpp/src/Ice/SUdpClient.cpp
@@ -0,0 +1,83 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/SUdpClient.h>
+#include <Ice/CryptKey.h>
+#include <Ice/MessageAuthenticator.h>
+
+using Ice::Long;
+using IceSecurity::SecureUdp::CryptKeyPtr;
+using IceSecurity::SecureUdp::MessageAuthenticatorPtr;
+
+void ::IceInternal::incRef(::IceSecurity::SecureUdp::SUdpClient* p) { p->__incRef(); }
+void ::IceInternal::decRef(::IceSecurity::SecureUdp::SUdpClient* p) { p->__decRef(); }
+
+IceSecurity::SecureUdp::SUdpClient::SUdpClient(Long clientID,
+ const ClientChannelPtr& clientChannel,
+ const MessageAuthenticatorPtr& messageAuthenticator) :
+ _clientID(clientID),
+ _clientChannel(clientChannel),
+ _messageAuthenticator(messageAuthenticator)
+{
+}
+
+IceSecurity::SecureUdp::SUdpClient::~SUdpClient()
+{
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::serverHello(const CryptKeyPtr& key)
+{
+ _clientChannel->serverHello(_clientID, key->toByteSeq());
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::serverKeyChange(const CryptKeyPtr& key)
+{
+ _clientChannel->serverKeyChange(key->toByteSeq());
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::serverGoodbye()
+{
+ _clientChannel->serverGoodbye();
+}
+
+Long
+IceSecurity::SecureUdp::SUdpClient::getClientID() const
+{
+ return _clientID;
+}
+
+const CryptKeyPtr&
+IceSecurity::SecureUdp::SUdpClient::getCryptKey() const
+{
+ return _cryptKey;
+}
+
+const CryptKeyPtr&
+IceSecurity::SecureUdp::SUdpClient::getCryptKey(Long msgID) const
+{
+ // TODO: Must be able to return a CryptKey based on a msgID
+ return _cryptKey;
+}
+
+const MessageAuthenticatorPtr&
+IceSecurity::SecureUdp::SUdpClient::getMessageAuthenticator() const
+{
+ return _messageAuthenticator;
+}
+
+void
+IceSecurity::SecureUdp::SUdpClient::setNewCryptKey(Long msgID, const CryptKeyPtr& cryptKey)
+{
+ _cryptKey = cryptKey;
+}
+