Added initial version information

This commit is contained in:
nathan 2016-03-07 01:21:47 +01:00
parent 8fc09609a2
commit 97eff8fe67
4 changed files with 35 additions and 1 deletions

View File

@ -43,6 +43,14 @@ class Broadcast {
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("Broadcast Host Discovery");
/**
* Gets the version number.
*/
public static
String getVersion() {
return "1.0";
}
/**
* Broadcasts a UDP message on the LAN to discover any running servers. The address of the first server to respond is returned.
* <p/>

View File

@ -61,6 +61,13 @@ import java.net.InetSocketAddress;
@SuppressWarnings("unused")
public
class Client<C extends Connection> extends EndPointClient<C> implements Connection {
/**
* Gets the version number.
*/
public static
String getVersion() {
return "1.0";
}
/**
* Starts a LOCAL <b>only</b> client, with the default local channel name and serialization scheme

View File

@ -27,6 +27,7 @@ import dorkbox.network.dns.record.ServiceRecord;
import dorkbox.network.dns.record.StartOfAuthorityRecord;
import dorkbox.util.NamedThreadFactory;
import dorkbox.util.OS;
import dorkbox.util.Property;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufHolder;
import io.netty.channel.AddressedEnvelope;
@ -84,7 +85,8 @@ class DnsClient {
}
// @formatter:off
public static final List<InetSocketAddress> DNS_SERVER_LIST = Arrays.asList(
@Property
public static List<InetSocketAddress> DNS_SERVER_LIST = Arrays.asList(
new InetSocketAddress("8.8.8.8", 53), // Google Public DNS
new InetSocketAddress("8.8.4.4", 53),
new InetSocketAddress("208.67.222.222", 53), // OpenDNS
@ -97,6 +99,14 @@ class DnsClient {
private static final String ptrSuffix = ".in-addr.arpa";
/**
* Gets the version number.
*/
public static
String getVersion() {
return "1.0";
}
/**
* Retrieve the public facing IP address of this system using DNS.
* <p/>

View File

@ -24,6 +24,7 @@ import dorkbox.network.connection.registration.remote.RegistrationRemoteHandlerS
import dorkbox.network.util.udt.UdtEndpointProxy;
import dorkbox.util.NamedThreadFactory;
import dorkbox.util.OS;
import dorkbox.util.Property;
import dorkbox.util.exceptions.InitializationException;
import dorkbox.util.exceptions.SecurityException;
import io.netty.bootstrap.Bootstrap;
@ -57,11 +58,19 @@ import java.io.IOException;
*/
public
class Server<C extends Connection> extends EndPointServer<C> {
/**
* Gets the version number.
*/
public static
String getVersion() {
return "1.0";
}
/**
* The maximum queue length for incoming connection indications (a request to connect). If a connection indication arrives when the
* queue is full, the connection is refused.
*/
@Property
public static int backlogConnectionCount = 50;
private final ServerBootstrap localBootstrap;