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>
- <version>0.0</version>
+ <version>0.2.2</version>
<packaging>jar</packaging>
<properties>
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");
}
public ServerNode (InetSocketAddress isa)
throws SocketException {
super ();
+ tunserver = isa;
maintainer = new Maintainer (this);
worker = new Worker (this);
- tunserver = isa;
udp_clients = new BlockingQueue [65536];
}
public ServerNode (InetSocketAddress isa, int port)
throws SocketException {
super (port);
+ tunserver = isa;
maintainer = new Maintainer (this);
worker = new Worker (this);
- tunserver = isa;
udp_clients = new BlockingQueue [65536];
}
public Worker (ServerNode owner) {
this.uplink = owner;
+ setDaemon (true);
}
}
*/
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);
}
}