Mercurial > hg > Members > kono > WifiBroadcast
comparison src/wifibroadcast/WifiMulticastChannel.java @ 19:bb2538b7eb8d
selectMode flag
author | one |
---|---|
date | Tue, 31 Jul 2012 17:02:46 +0900 |
parents | e9d07562b6b7 |
children | 313dc81af36c |
comparison
equal
deleted
inserted
replaced
18:e9d07562b6b7 | 19:bb2538b7eb8d |
---|---|
17 protected InetAddress mAddr; | 17 protected InetAddress mAddr; |
18 protected DatagramChannel dc; | 18 protected DatagramChannel dc; |
19 protected SocketAddress sAddr; | 19 protected SocketAddress sAddr; |
20 // select on DatagramChannel does not work now | 20 // select on DatagramChannel does not work now |
21 protected Selector selector; | 21 protected Selector selector; |
22 protected boolean selectMode = true; | 22 protected boolean selectMode = false; |
23 | 23 |
24 public WifiMulticastChannel() {} | 24 public WifiMulticastChannel() {} |
25 | 25 |
26 public WifiMulticastChannel(int id, String mCASTADDR, int port,String nis, SocketType sender) throws IOException { | 26 public WifiMulticastChannel(int id, String mCASTADDR, int port,String nis, SocketType sender) throws IOException { |
27 // join multicast group on this interface, and also use this | 27 // join multicast group on this interface, and also use this |
76 // Thread.sleep(100); | 76 // Thread.sleep(100); |
77 // } catch (InterruptedException e) { | 77 // } catch (InterruptedException e) { |
78 // } | 78 // } |
79 } | 79 } |
80 | 80 |
81 @Override | |
82 public void selectMode(boolean mode) { | |
83 selectMode = mode; | |
84 } | |
85 | |
81 } | 86 } |