projects
/
socket6bed4
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c067ae
)
Update, notably prefixed domain to groupId.
author
Rick van Rein
<rick@openfortress.nl>
Thu, 27 Dec 2012 14:25:23 +0000
(15:25 +0100)
committer
Rick van Rein
<rick@openfortress.nl>
Thu, 27 Dec 2012 14:25:23 +0000
(15:25 +0100)
pom.xml
patch
|
blob
|
history
src/main/java/nl/openfortress/socket6bed4/DatagramSocket6bed4.java
patch
|
blob
|
history
src/main/java/nl/openfortress/socket6bed4/NeighborCache.java
patch
|
blob
|
history
src/main/java/nl/openfortress/socket6bed4/ServerNode.java
patch
|
blob
|
history
diff --git
a/pom.xml
b/pom.xml
index
12a9e22
..
25df893
100644
(file)
--- a/
pom.xml
+++ b/
pom.xml
@@
-2,9
+2,9
@@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>socket6bed4</groupId>
+ <groupId>nl.openfortress.socket6bed4</groupId>
<artifactId>nl.openfortress.socket6bed4</artifactId>
<artifactId>nl.openfortress.socket6bed4</artifactId>
- <version>0.0</version>
+ <version>0.2.2</version>
<packaging>jar</packaging>
<properties>
<packaging>jar</packaging>
<properties>
diff --git
a/src/main/java/nl/openfortress/socket6bed4/DatagramSocket6bed4.java
b/src/main/java/nl/openfortress/socket6bed4/DatagramSocket6bed4.java
index
92dd30c
..
3678c4b
100644
(file)
--- a/
src/main/java/nl/openfortress/socket6bed4/DatagramSocket6bed4.java
+++ b/
src/main/java/nl/openfortress/socket6bed4/DatagramSocket6bed4.java
@@
-94,6
+94,11
@@
public class DatagramSocket6bed4 extends DatagramSocket {
throws SocketException {
//
// Verify if binding request is properly formed
throws SocketException {
//
// Verify if binding request is properly formed
+ if (port == 0) {
+ // Although I did not see it specified, this C-ism is apparently used a lot
+ bind ((InetSocketAddress) null);
+ return;
+ }
if ((port <= 0) || (port > 65535)) {
throw new SocketException ("Binding is only possible to ports from 1 to 65535");
}
if ((port <= 0) || (port > 65535)) {
throw new SocketException ("Binding is only possible to ports from 1 to 65535");
}
diff --git
a/src/main/java/nl/openfortress/socket6bed4/NeighborCache.java
b/src/main/java/nl/openfortress/socket6bed4/NeighborCache.java
index
6e545a7
..
cc705ba
100644
(file)
--- a/
src/main/java/nl/openfortress/socket6bed4/NeighborCache.java
+++ b/
src/main/java/nl/openfortress/socket6bed4/NeighborCache.java
@@
-467,6
+467,7
@@
class NeighborCache {
cache = owner;
whoami = mystate;
queue = new ArrayDeque <Neighbor> ();
cache = owner;
whoami = mystate;
queue = new ArrayDeque <Neighbor> ();
+ setDaemon (true);
this.start ();
}
this.start ();
}
diff --git
a/src/main/java/nl/openfortress/socket6bed4/ServerNode.java
b/src/main/java/nl/openfortress/socket6bed4/ServerNode.java
index
ecbfe86
..
f3dfb55
100644
(file)
--- a/
src/main/java/nl/openfortress/socket6bed4/ServerNode.java
+++ b/
src/main/java/nl/openfortress/socket6bed4/ServerNode.java
@@
-46,9
+46,9
@@
extends DatagramSocket {
public ServerNode (InetSocketAddress isa)
throws SocketException {
super ();
public ServerNode (InetSocketAddress isa)
throws SocketException {
super ();
+ tunserver = isa;
maintainer = new Maintainer (this);
worker = new Worker (this);
maintainer = new Maintainer (this);
worker = new Worker (this);
- tunserver = isa;
udp_clients = new BlockingQueue [65536];
}
udp_clients = new BlockingQueue [65536];
}
@@
-66,9
+66,9
@@
extends DatagramSocket {
public ServerNode (InetSocketAddress isa, int port)
throws SocketException {
super (port);
public ServerNode (InetSocketAddress isa, int port)
throws SocketException {
super (port);
+ tunserver = isa;
maintainer = new Maintainer (this);
worker = new Worker (this);
maintainer = new Maintainer (this);
worker = new Worker (this);
- tunserver = isa;
udp_clients = new BlockingQueue [65536];
}
udp_clients = new BlockingQueue [65536];
}
@@
-646,6
+646,7
@@
extends DatagramSocket {
public Worker (ServerNode owner) {
this.uplink = owner;
public Worker (ServerNode owner) {
this.uplink = owner;
+ setDaemon (true);
}
}
}
}
@@
-761,6
+762,14
@@
extends DatagramSocket {
*/
public Maintainer (DatagramSocket uplink) {
this.uplink = uplink;
*/
public Maintainer (DatagramSocket uplink) {
this.uplink = uplink;
+ try {
+ byte payload[] = { };
+ keepalive_packet = new DatagramPacket (payload, 0, tunserver);
+ } catch (SocketException se) {
+ System.err.println (se);
+ keepalive_packet = null;
+ }
+ setDaemon (true);
}
}
}
}