From f45cbf16090d3da9c5212ce52d36922acb57d90b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 16 Aug 2012 23:51:48 +0400 Subject: Allow binding on one address --- src/org/traccar/http/WebServer.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/org/traccar/http') 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(); -- cgit v1.2.3