Mercurial > hg > Members > kono > WifiBroadcast
changeset 20:313dc81af36c
too late select mode
author | one |
---|---|
date | Tue, 31 Jul 2012 17:19:02 +0900 |
parents | bb2538b7eb8d |
children | 48d458bb921a |
files | src/wifibroadcast/WifiBroadcastChannel.java src/wifibroadcast/WifiMulticastChannel.java |
diffstat | 2 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/wifibroadcast/WifiBroadcastChannel.java Tue Jul 31 17:02:46 2012 +0900 +++ b/src/wifibroadcast/WifiBroadcastChannel.java Tue Jul 31 17:19:02 2012 +0900 @@ -12,7 +12,6 @@ public WifiBroadcastChannel(int id, int port, SocketType sender) throws IOException { // join multicast group on this interface, and also use this // interface for outgoing multicast datagrams - selectMode = false; selector = SelectorProvider.provider().openSelector(); dc = SelectorProvider.provider().openDatagramChannel(StandardProtocolFamily.INET); dc.setOption(StandardSocketOptions.SO_REUSEADDR, true);
--- a/src/wifibroadcast/WifiMulticastChannel.java Tue Jul 31 17:02:46 2012 +0900 +++ b/src/wifibroadcast/WifiMulticastChannel.java Tue Jul 31 17:19:02 2012 +0900 @@ -19,7 +19,7 @@ protected SocketAddress sAddr; // select on DatagramChannel does not work now protected Selector selector; - protected boolean selectMode = false; + protected boolean selectMode = true; public WifiMulticastChannel() {}