aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/http
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-08-16 23:51:48 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2012-08-16 23:51:48 +0400
commitf45cbf16090d3da9c5212ce52d36922acb57d90b (patch)
tree5ed1deaf56d40f4cc9ca6f1fe3baadd6c0b4bd8f /src/org/traccar/http
parent5eee3dfcc05d64d8ec7f45de09dae5eee85d1454 (diff)
downloadtraccar-server-f45cbf16090d3da9c5212ce52d36922acb57d90b.tar.gz
traccar-server-f45cbf16090d3da9c5212ce52d36922acb57d90b.tar.bz2
traccar-server-f45cbf16090d3da9c5212ce52d36922acb57d90b.zip
Allow binding on one address
Diffstat (limited to 'src/org/traccar/http')
-rw-r--r--src/org/traccar/http/WebServer.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/http/WebServer.java b/src/org/traccar/http/WebServer.java
index 6c79e6421..5dfeabed2 100644
--- a/src/org/traccar/http/WebServer.java
+++ b/src/org/traccar/http/WebServer.java
@@ -19,6 +19,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
+import java.net.InetSocketAddress;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -193,6 +194,11 @@ public class WebServer {
server.setHandler(new WebHandler(dataManager));
}
+ public WebServer(String address, Integer port, DataManager dataManager) {
+ server = new Server(new InetSocketAddress(address, port));
+ server.setHandler(new WebHandler(dataManager));
+ }
+
public void start() {
try {
server.start();