summaryrefslogtreecommitdiffstats
path: root/common/network
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2009-12-21 16:35:28 +0000
committerAdam Tkac <atkac@redhat.com>2009-12-21 16:35:28 +0000
commit763de175aff3bc3345558346a596fec0f2f7c5f0 (patch)
treefe782401db7dfd003dd758247daeb0d52a8d5720 /common/network
parentb514bc7b802f48272e089e64c97a9cd76c34db71 (diff)
downloadtigervnc-763de175aff3bc3345558346a596fec0f2f7c5f0.tar.gz
tigervnc-763de175aff3bc3345558346a596fec0f2f7c5f0.zip
[Cleanup] Remove unused Socket::getMyAddress and Socket::getMyEndpoint functions.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3930 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/network')
-rw-r--r--common/network/Socket.h2
-rw-r--r--common/network/TcpSocket.cxx26
-rw-r--r--common/network/TcpSocket.h2
3 files changed, 0 insertions, 30 deletions
diff --git a/common/network/Socket.h b/common/network/Socket.h
index b93da2ef..378a9006 100644
--- a/common/network/Socket.h
+++ b/common/network/Socket.h
@@ -50,9 +50,7 @@ namespace network {
bool isShutdown() const {return isShutdown_;}
// information about this end of the socket
- virtual char* getMyAddress() = 0; // a string e.g. "192.168.0.1"
virtual int getMyPort() = 0;
- virtual char* getMyEndpoint() = 0; // <address>::<port>
// information about the remote end of the socket
virtual char* getPeerAddress() = 0; // a string e.g. "192.168.0.1"
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 93cdceb2..e2b61a83 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -228,36 +228,10 @@ TcpSocket::~TcpSocket() {
closesocket(getFd());
}
-char* TcpSocket::getMyAddress() {
- struct sockaddr_in info;
- struct in_addr addr;
- socklen_t info_size = sizeof(info);
-
- getsockname(getFd(), (struct sockaddr *)&info, &info_size);
- memcpy(&addr, &info.sin_addr, sizeof(addr));
-
- char* name = inet_ntoa(addr);
- if (name) {
- return rfb::strDup(name);
- } else {
- return rfb::strDup("");
- }
-}
-
int TcpSocket::getMyPort() {
return getSockPort(getFd());
}
-char* TcpSocket::getMyEndpoint() {
- rfb::CharArray address; address.buf = getMyAddress();
- int port = getMyPort();
-
- int buflen = strlen(address.buf) + 32;
- char* buffer = new char[buflen];
- sprintf(buffer, "%s::%d", address.buf, port);
- return buffer;
-}
-
char* TcpSocket::getPeerAddress() {
struct sockaddr_in info;
struct in_addr addr;
diff --git a/common/network/TcpSocket.h b/common/network/TcpSocket.h
index 774c6e13..00ccf78a 100644
--- a/common/network/TcpSocket.h
+++ b/common/network/TcpSocket.h
@@ -46,9 +46,7 @@ namespace network {
TcpSocket(const char *name, int port);
virtual ~TcpSocket();
- virtual char* getMyAddress();
virtual int getMyPort();
- virtual char* getMyEndpoint();
virtual char* getPeerAddress();
virtual int getPeerPort();