summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorBrian P. Hinz <bphinz@users.sf.net>2014-11-13 21:12:49 -0500
committerBrian P. Hinz <bphinz@users.sf.net>2014-11-13 21:12:49 -0500
commita9595fbf79b631f02b47bcf117b508e9de93659f (patch)
tree42e486d5bce20162ca19bd497f34b11c336c081c /java
parent93721e78f145f1e7d92cd8c5a1f8e0b0b502c6ce (diff)
downloadtigervnc-a9595fbf79b631f02b47bcf117b508e9de93659f.tar.gz
tigervnc-a9595fbf79b631f02b47bcf117b508e9de93659f.zip
Java code cleanup
Deleted some useless comments in java viewer
Diffstat (limited to 'java')
-rw-r--r--java/com/tigervnc/network/Socket.java27
-rw-r--r--java/com/tigervnc/network/SocketListener.java3
-rw-r--r--java/com/tigervnc/network/TcpListener.java20
3 files changed, 0 insertions, 50 deletions
diff --git a/java/com/tigervnc/network/Socket.java b/java/com/tigervnc/network/Socket.java
index bcc920de..651dc05a 100644
--- a/java/com/tigervnc/network/Socket.java
+++ b/java/com/tigervnc/network/Socket.java
@@ -58,7 +58,6 @@ abstract public class Socket {
// Is the remote end on the same machine?
abstract public boolean sameMachine();
- // Was there a "?" in the ConnectionFilter used to accept this Socket?
public void setRequiresQuery() {queryConnection = true;}
public final boolean requiresQuery() {return queryConnection;}
@@ -78,29 +77,3 @@ abstract public class Socket {
boolean isShutdown_;
boolean queryConnection;
}
-
-/*
-abstract class ConnectionFilter {
- public abstract boolean verifyConnection(Socket s);
-};
-
-abstract class SocketListener {
- public SocketListener() {
- fd = null; filter = null;
- }
-
- // shutdown() stops the socket from accepting further connections
- public abstract void shutdown();
-
- // accept() returns a new Socket object if there is a connection
- // attempt in progress AND if the connection passes the filter
- // if one is installed. Otherwise, returns 0.
- public abstract Socket accept();
-
- // setFilter() applies the specified filter to all new connections
- public void setFilter(ConnectionFilter f) {filter = f;}
- //public SocketDescriptor getFd() {return fd;}
- protected FileDescriptor fd;
- protected ConnectionFilter filter;
-};
-*/
diff --git a/java/com/tigervnc/network/SocketListener.java b/java/com/tigervnc/network/SocketListener.java
index a1b2c122..6401c2cc 100644
--- a/java/com/tigervnc/network/SocketListener.java
+++ b/java/com/tigervnc/network/SocketListener.java
@@ -36,11 +36,8 @@ abstract public class SocketListener {
// if one is installed. Otherwise, returns 0.
abstract public Socket accept();
- // setFilter() applies the specified filter to all new connections
- //public void setFilter(ConnectionFilter* f) {filter = f;}
public FileDescriptor getFd() {return fd;}
protected FileDescriptor fd;
- //protected ConnectionFilter* filter;
}
diff --git a/java/com/tigervnc/network/TcpListener.java b/java/com/tigervnc/network/TcpListener.java
index bab9e4c5..b66558b9 100644
--- a/java/com/tigervnc/network/TcpListener.java
+++ b/java/com/tigervnc/network/TcpListener.java
@@ -132,29 +132,9 @@ public class TcpListener extends SocketListener {
}
fd.setChannel(new_sock);
TcpSocket s = new TcpSocket(fd);
- //if (filter && !filter->verifyConnection(s)) {
- // delete s;
- // return 0;
- //}
return s;
}
-/*
-void TcpListener::getMyAddresses(std::list<char*>* result) {
- const hostent* addrs = gethostbyname(0);
- if (addrs == 0)
- throw rdr::SystemException("gethostbyname", errorNumber);
- if (addrs->h_addrtype != AF_INET)
- throw rdr::Exception("getMyAddresses: bad family");
- for (int i=0; addrs->h_addr_list[i] != 0; i++) {
- const char* addrC = inet_ntoa(*((struct in_addr*)addrs->h_addr_list[i]));
- char* addr = new char[strlen(addrC)+1];
- strcpy(addr, addrC);
- result->push_back(addr);
- }
-}
- */
-
//public int getMyPort() {
// return TcpSocket.getSockPort();
//}