etch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vei...@apache.org
Subject svn commit: r1548399 - in /etch/trunk/binding-cpp/runtime: include/common/EtchSocket.h src/main/common/EtchSocket.cpp
Date Fri, 06 Dec 2013 08:06:49 GMT
Author: veithm
Date: Fri Dec  6 08:06:49 2013
New Revision: 1548399

URL: http://svn.apache.org/r1548399
Log:
Adding getRemoteAddress() functionality to EtchSocket

This method is based on CAPU and returns the IP address
of the remote peer the socket is connected to.

Change-Id: I6da81a8029f7fba79808c7ab883787fe05e6f996

Modified:
    etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h
    etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp

Modified: etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h?rev=1548399&r1=1548398&r2=1548399&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h (original)
+++ etch/trunk/binding-cpp/runtime/include/common/EtchSocket.h Fri Dec  6 08:06:49 2013
@@ -178,6 +178,14 @@ public:
    */
   status_t getTimeout(capu::int32_t& timeout);
 
+  /**
+   * Get address from remote
+   * @return ETCH_OK if the address was successfully obtained
+   *         ETCH_SOCKET_ESOCKET if the socket is not valid
+   *         ETCH_ERROR otherwise
+   */
+  status_t getRemoteAddress(capu::char_t** address);
+
   friend class EtchServerSocket;
 
 private:

Modified: etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp
URL: http://svn.apache.org/viewvc/etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp?rev=1548399&r1=1548398&r2=1548399&view=diff
==============================================================================
--- etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp (original)
+++ etch/trunk/binding-cpp/runtime/src/main/common/EtchSocket.cpp Fri Dec  6 08:06:49 2013
@@ -100,3 +100,8 @@ status_t EtchSocket::getNoDelay(capu::bo
 status_t EtchSocket::getTimeout(capu::int32_t& timeout) {
   return mSocket->getTimeout(timeout);
 }
+
+status_t EtchSocket::getRemoteAddress( capu::char_t** address )
+{
+  return mSocket->getRemoteAddress(address);
+}



Mime
View raw message