Commit graph

12 commits

Author SHA1 Message Date
Martynas Mickevicius
325e05ee27 !act #15626 expose DatagramChannel creation in DatagramChannelCreator
* move channel creation logic to a separate trait
* new Java API: AbstractSocketOption
2014-08-19 14:02:23 +03:00
Michael R. Maletich
a6d3704ef6 !act #13490 Changed the callback to SocketOption to accept a channel instead of a Socket, this allows for using the nio features.
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.
2014-07-22 20:22:53 -05:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Björn Antonsson
179faba453 =all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8 2014-01-31 14:13:02 +01:00
Patrik Nordwall
a11fb1dafc =act #3572 Add parens to sender
* because it is not referentially transparent; normally we reserved parens for
  side-effecting code but given how people thoughtlessly close over it we revised
  that that decision for sender
* caller can still omit parens
2014-01-17 18:21:14 +01:00
Björn Antonsson
003609c9c5 =pro #3759 Changed to using non-deprecated ScalaTest Matchers 2013-12-18 11:32:51 +01:00
Mathias
8afd7a440d io tests: clean up imports 2013-06-14 14:47:14 +02:00
Roland
92db59183e make LocalScope mean “purely local” and avoid Props serialization check, see #3210 2013-05-29 23:36:39 +02:00
Roland
b6efd467e8 add ScalaDocs and correct UDP docs, see 3268 2013-05-26 18:29:23 +02:00
Endre Sándor Varga
3b41eaa1f7 Udp tests now use port acquired from a DatagramSocket #3245 2013-04-22 16:31:06 +02:00
Roland
6a4be23d58 include bound localAddress in Bound message, see #3230
- done for Tcp & Udp in the same way
- also try to fix TcpConnectionSpec on my Mac
2013-04-15 11:58:50 +02:00
Roland
309f2c2f91 rename UdpFF->Udp and the other UdpConnected, see #3058 2013-04-04 09:04:30 +02:00
Renamed from akka-actor-tests/src/test/scala/akka/io/UdpFFIntegrationSpec.scala (Browse further)