Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions actor/src/main/scala/org/apache/pekko/io/Tcp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import java.net.InetSocketAddress
import java.net.Socket
import java.nio.file.{ Path, Paths }

import scala.annotation.nowarn
import scala.collection.immutable
import scala.concurrent.duration._
import scala.jdk.CollectionConverters._
Expand Down Expand Up @@ -131,11 +130,10 @@ object Tcp extends ExtensionId[TcpExt] with ExtensionIdProvider {
* @param localAddress optionally specifies a specific address to bind to
* @param options Please refer to the `Tcp.SO` object for a list of all supported options.
*/
@nowarn("msg=deprecated")
final case class Connect(
remoteAddress: InetSocketAddress,
localAddress: Option[InetSocketAddress] = None,
options: immutable.Traversable[SocketOption] = Nil,
options: immutable.Iterable[SocketOption] = Nil,
timeout: Option[FiniteDuration] = None,
pullMode: Boolean = false)
extends Command
Expand All @@ -159,12 +157,11 @@ object Tcp extends ExtensionId[TcpExt] with ExtensionIdProvider {
*
* @param options Please refer to the `Tcp.SO` object for a list of all supported options.
*/
@nowarn("msg=deprecated")
final case class Bind(
handler: ActorRef,
localAddress: InetSocketAddress,
backlog: Int = 100,
options: immutable.Traversable[SocketOption] = Nil,
options: immutable.Iterable[SocketOption] = Nil,
pullMode: Boolean = false)
extends Command

Expand Down
4 changes: 1 addition & 3 deletions actor/src/main/scala/org/apache/pekko/io/TcpConnection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import java.nio.channels.{ FileChannel, SocketChannel }
import java.nio.channels.SelectionKey._
import java.nio.file.Path

import scala.annotation.nowarn
import scala.annotation.tailrec
import scala.collection.immutable
import scala.concurrent.duration._
Expand Down Expand Up @@ -219,11 +218,10 @@ private[io] abstract class TcpConnection(val tcp: TcpExt, val channel: SocketCha
// AUXILIARIES and IMPLEMENTATION

/** used in subclasses to start the common machinery above once a channel is connected */
@nowarn("msg=deprecated")
def completeConnect(
registration: ChannelRegistration,
commander: ActorRef,
options: immutable.Traversable[SocketOption]): Unit = {
options: immutable.Iterable[SocketOption]): Unit = {
this.registration = Some(registration)

// Turn off Nagle's algorithm by default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ package org.apache.pekko.io

import java.nio.channels.SocketChannel

import scala.annotation.nowarn
import scala.collection.immutable

import org.apache.pekko
Expand All @@ -28,13 +27,12 @@ import pekko.io.Inet.SocketOption
*
* INTERNAL API
*/
@nowarn("msg=deprecated")
private[io] class TcpIncomingConnection(
_tcp: TcpExt,
_channel: SocketChannel,
registry: ChannelRegistry,
bindHandler: ActorRef,
options: immutable.Traversable[SocketOption],
options: immutable.Iterable[SocketOption],
readThrottling: Boolean)
extends TcpConnection(_tcp, _channel, readThrottling) {

Expand Down
7 changes: 2 additions & 5 deletions actor/src/main/scala/org/apache/pekko/io/Udp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package org.apache.pekko.io
import java.net.DatagramSocket
import java.net.InetSocketAddress

import scala.annotation.nowarn
import scala.collection.immutable

import org.apache.pekko
Expand Down Expand Up @@ -111,11 +110,10 @@ object Udp extends ExtensionId[UdpExt] with ExtensionIdProvider {
* The listener actor for the newly bound port will reply with a [[Bound]]
* message, or the manager will reply with a [[CommandFailed]] message.
*/
@nowarn("msg=deprecated")
final case class Bind(
handler: ActorRef,
localAddress: InetSocketAddress,
options: immutable.Traversable[SocketOption] = Nil)
options: immutable.Iterable[SocketOption] = Nil)
extends Command

/**
Expand All @@ -135,8 +133,7 @@ object Udp extends ExtensionId[UdpExt] with ExtensionIdProvider {
* The “simple sender” will not stop itself, you will have to send it a [[pekko.actor.PoisonPill]]
* when you want to close the socket.
*/
@nowarn("msg=deprecated")
case class SimpleSender(options: immutable.Traversable[SocketOption] = Nil) extends Command
case class SimpleSender(options: immutable.Iterable[SocketOption] = Nil) extends Command
object SimpleSender extends SimpleSender(Nil)

/**
Expand Down
4 changes: 1 addition & 3 deletions actor/src/main/scala/org/apache/pekko/io/UdpConnected.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package org.apache.pekko.io
import java.lang.{ Iterable => JIterable }
import java.net.InetSocketAddress

import scala.annotation.nowarn
import scala.collection.immutable

import org.apache.pekko
Expand Down Expand Up @@ -104,12 +103,11 @@ object UdpConnected extends ExtensionId[UdpConnectedExt] with ExtensionIdProvide
* which is restricted to sending to and receiving from the given `remoteAddress`.
* All received datagrams will be sent to the designated `handler` actor.
*/
@nowarn("msg=deprecated")
final case class Connect(
handler: ActorRef,
remoteAddress: InetSocketAddress,
localAddress: Option[InetSocketAddress] = None,
options: immutable.Traversable[SocketOption] = Nil)
options: immutable.Iterable[SocketOption] = Nil)
extends Command

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ final class Tcp(system: ExtendedActorSystem) extends pekko.actor.Extension {
interface: String,
port: Int,
backlog: Int = defaultBacklog,
@nowarn // Traversable deprecated in 2.13
options: immutable.Traversable[SocketOption] = Nil,
options: immutable.Iterable[SocketOption] = Nil,
halfClose: Boolean = false,
idleTimeout: Duration = Duration.Inf): Source[IncomingConnection, Future[ServerBinding]] =
Source.fromGraph(
Expand Down Expand Up @@ -182,8 +181,7 @@ final class Tcp(system: ExtendedActorSystem) extends pekko.actor.Extension {
interface: String,
port: Int,
backlog: Int = defaultBacklog,
@nowarn // Traversable deprecated in 2.13
options: immutable.Traversable[SocketOption] = Nil,
options: immutable.Iterable[SocketOption] = Nil,
halfClose: Boolean = false,
idleTimeout: Duration = Duration.Inf)(implicit m: Materializer): Future[ServerBinding] = {
bind(interface, port, backlog, options, halfClose, idleTimeout)
Expand Down Expand Up @@ -216,8 +214,7 @@ final class Tcp(system: ExtendedActorSystem) extends pekko.actor.Extension {
def outgoingConnection(
remoteAddress: InetSocketAddress,
localAddress: Option[InetSocketAddress] = None,
@nowarn // Traversable deprecated in 2.13
options: immutable.Traversable[SocketOption] = Nil,
options: immutable.Iterable[SocketOption] = Nil,
halfClose: Boolean = true,
connectTimeout: Duration = Duration.Inf,
idleTimeout: Duration = Duration.Inf): Flow[ByteString, ByteString, Future[OutgoingConnection]] = {
Expand Down