Set the traffic class for datagrams to low-delay. I doubt this will

actually reduce latency, but wouldn't it be cool if it did?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5985 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2009-11-06 20:56:37 +00:00
parent ee27342a24
commit a707c8b515
2 changed files with 2 additions and 0 deletions
@@ -757,6 +757,7 @@ public class BlockingCommunicator extends Communicator
// create and register the channel
_datagramChannel = DatagramChannel.open();
_datagramChannel.socket().setTrafficClass(0x10); // IPTOS_LOWDELAY
_datagramChannel.configureBlocking(false);
_datagramChannel.register(_selector, SelectionKey.OP_READ, null);
@@ -403,6 +403,7 @@ public class ConnectionManager extends LoopingThread
try {
// create a channel and add it to the select set
_datagramChannel = DatagramChannel.open();
_datagramChannel.socket().setTrafficClass(0x10); // IPTOS_LOWDELAY
_datagramChannel.configureBlocking(false);
InetSocketAddress isa = getAddress(port);
_datagramChannel.socket().bind(isa);