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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user