For example in Java 7 you can now join a multicast group:
case class JoinGroup(group: InetAddress, networkInterface: NetworkInterface) extends SocketOption {
override def afterConnect(c: DatagramChannel): Unit = {
c.join(group, networkInterface)
}
}
IO(Udp) ! Udp.Bind(self, new InetSocketAddress(MulticastListener.port),
options=List(ReuseAddress(true),
JoinGroup(MulticastListener.group, MulticastListener.interf)))
Other minor changes:
- changed all methods in SocketOption to take a Channel instead of a Socket. The socket can be gotten from the Channel but not the reverse.
- all methods that are called before the bind are now called beforeBind for consistency.
- All network connections now call the beforeBind and afterConnect.
|
||
|---|---|---|
| .. | ||
| _sphinx | ||
| rst | ||
| .history | ||
| build.sbt | ||