projects
/
WeStealzYourDataz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4bc4a9
)
NetworkStream: introduce getLocalAddress()
author
TJ
<hacker@iam.tj>
Sat, 6 Jun 2015 18:03:32 +0000
(19:03 +0100)
committer
TJ
<hacker@iam.tj>
Sat, 6 Jun 2015 18:03:32 +0000
(19:03 +0100)
src/uk/ac/ntu/n0521366/wsyd/libs/net/NetworkStream.java
patch
|
blob
|
history
diff --git
a/src/uk/ac/ntu/n0521366/wsyd/libs/net/NetworkStream.java
b/src/uk/ac/ntu/n0521366/wsyd/libs/net/NetworkStream.java
index
48b1559
..
6125720
100644
(file)
--- a/
src/uk/ac/ntu/n0521366/wsyd/libs/net/NetworkStream.java
+++ b/
src/uk/ac/ntu/n0521366/wsyd/libs/net/NetworkStream.java
@@
-294,4
+294,13
@@
public class NetworkStream extends SwingWorker<Boolean, NetworkMessage> {
public InetSocketAddress getRemoteAddress() {
return (_socket != null ? (InetSocketAddress) _socket.getRemoteSocketAddress() : null);
}
+
+ /**
+ * Get local IP address:port of this connection.
+ *
+ * @return the IP address:port pair
+ */
+ public InetSocketAddress getLocalAddress() {
+ return (_socket != null ? (InetSocketAddress) _socket.getLocalSocketAddress() : null);
+ }
}