akka/akka — pull request #1712 by HawaiianSpork (2013-09-08 14:56:15+00:00)
Title: Added afterConnect callback to SocketOption that is called after UdpListener connects.

https://www.assembla.com/spaces/akka/tickets/3490#/activity/ticket

Added the callback for users so users of Java 7 can specify a multicast join option. Example:

```scala
case class JoinGroup(group: InetAddress, networkInterface: NetworkInterface) extends SocketOption {

override def afterConnect(c: DatagramChannel): Unit = {
c.join(group, networkInterface)
}
}
```
```scala
IO(Udp) ! Udp.Bind(self, new InetSocketAddress(MulticastListener.port),
options=List(ReuseAddress(true),
JoinGroup(MulticastListener.group, MulticastListener.interf)))
```

I did not add the JoinGroup socket option code base because that would require the code be compiled/run with Java 7 runtime.