aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/TrackerServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/TrackerServer.java')
-rw-r--r--src/org/traccar/TrackerServer.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/TrackerServer.java b/src/org/traccar/TrackerServer.java
index da889d0a3..488186606 100644
--- a/src/org/traccar/TrackerServer.java
+++ b/src/org/traccar/TrackerServer.java
@@ -16,8 +16,10 @@
package org.traccar;
import java.net.InetSocketAddress;
+import java.nio.ByteOrder;
import java.util.concurrent.Executors;
import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.buffer.HeapChannelBufferFactory;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.group.ChannelGroup;
import org.jboss.netty.channel.group.ChannelGroupFuture;
@@ -60,6 +62,13 @@ public class TrackerServer extends ServerBootstrap {
}
/**
+ * Set endianness
+ */
+ void setEndianness(ByteOrder byteOrder) {
+ setOption("child.bufferFactory", new HeapChannelBufferFactory(byteOrder));
+ }
+
+ /**
* Opened channels
*/
private ChannelGroup allChannels = new DefaultChannelGroup();