akka.io.TcpIncomingConnection.scala Maven / Gradle / Ivy
/*
* Copyright (C) 2009-2020 Lightbend Inc.
*/
package akka.io
import java.nio.channels.SocketChannel
import scala.collection.immutable
import com.github.ghik.silencer.silent
import akka.actor.ActorRef
import akka.io.Inet.SocketOption
/**
* An actor handling the connection state machine for an incoming, already connected
* SocketChannel.
*
* INTERNAL API
*/
@silent("deprecated")
private[io] class TcpIncomingConnection(
_tcp: TcpExt,
_channel: SocketChannel,
registry: ChannelRegistry,
bindHandler: ActorRef,
options: immutable.Traversable[SocketOption],
readThrottling: Boolean)
extends TcpConnection(_tcp, _channel, readThrottling) {
signDeathPact(bindHandler)
registry.register(channel, initialOps = 0)
def receive = {
case registration: ChannelRegistration => completeConnect(registration, bindHandler, options)
}
}