Packages

final class UnixDomainSocket extends UnixDomainSocketImpl

Provides Unix Domain Socket functionality to Akka Streams with an interface similar to Akka's Tcp class.

Source
UnixDomainSocket.scala
Linear Supertypes
UnixDomainSocketImpl, Extension, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnixDomainSocket
  2. UnixDomainSocketImpl
  3. Extension
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new UnixDomainSocket(system: ExtendedActorSystem)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bind(path: Path, backlog: Int = 128, halfClose: Boolean = false): Source[IncomingConnection, Future[ServerBinding]]

    Creates a UnixDomainSocket.ServerBinding instance which represents a prospective Unix Domain Socket server binding on the given endpoint.

    Creates a UnixDomainSocket.ServerBinding instance which represents a prospective Unix Domain Socket server binding on the given endpoint.

    Please note that the startup of the server is asynchronous, i.e. after materializing the enclosing akka.stream.scaladsl.RunnableGraph the server is not immediately available. Only after the materialized future completes is the server ready to accept client connections.

    TODO: Support idleTimeout as per Tcp.

    path

    The path to listen on

    backlog

    Controls the size of the connection backlog

    halfClose

    Controls whether the connection is kept open even after writing has been completed to the accepted socket connections. If set to true, the connection will implement the socket half-close mechanism, allowing the client to write to the connection even after the server has finished writing. The socket is only closed after both the client and server finished writing. If set to false, the connection will immediately closed once the server closes its write side, independently whether the client is still attempting to write. This setting is recommended for servers, and therefore it is the default setting.

    Definition Classes
    UnixDomainSocket → UnixDomainSocketImpl
  6. def bindAndHandle(handler: Flow[ByteString, ByteString, _], path: Path, backlog: Int = 128, halfClose: Boolean = false): Future[ServerBinding]

    Creates a UnixDomainSocket.ServerBinding instance which represents a prospective Unix Socket server binding on the given endpoint handling the incoming connections using the provided Flow.

    Creates a UnixDomainSocket.ServerBinding instance which represents a prospective Unix Socket server binding on the given endpoint handling the incoming connections using the provided Flow.

    Please note that the startup of the server is asynchronous, i.e. after materializing the enclosing akka.stream.scaladsl.RunnableGraph the server is not immediately available. Only after the returned future completes is the server ready to accept client connections.

    TODO: Support idleTimeout as per Tcp.

    handler

    A Flow that represents the server logic

    path

    The path to listen on

    backlog

    Controls the size of the connection backlog

    halfClose

    Controls whether the connection is kept open even after writing has been completed to the accepted socket connections. If set to true, the connection will implement the socket half-close mechanism, allowing the client to write to the connection even after the server has finished writing. The socket is only closed after both the client and server finished writing. If set to false, the connection will immediately closed once the server closes its write side, independently whether the client is still attempting to write. This setting is recommended for servers, and therefore it is the default setting.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def logSource: Class[_]

    Override to customise reported log source

    Override to customise reported log source

    Attributes
    protected
    Definition Classes
    UnixDomainSocketImpl
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def outgoingConnection(path: Path): Flow[ByteString, ByteString, Future[OutgoingConnection]]

    Creates an UnixDomainSocket.OutgoingConnection without specifying options.

    Creates an UnixDomainSocket.OutgoingConnection without specifying options. It represents a prospective Unix Domain client connection to the given endpoint.

    Note that the ByteString chunk boundaries are not retained across the network, to achieve application level chunks you have to introduce explicit framing in your streams, for example using the akka.stream.scaladsl.Framing stages.

  18. def outgoingConnection(remoteAddress: UnixSocketAddress, localAddress: Option[UnixSocketAddress] = None, halfClose: Boolean = true, connectTimeout: Duration = Duration.Inf): Flow[ByteString, ByteString, Future[OutgoingConnection]]

    Creates an UnixDomainSocket.OutgoingConnection instance representing a prospective Unix Domain client connection to the given endpoint.

    Creates an UnixDomainSocket.OutgoingConnection instance representing a prospective Unix Domain client connection to the given endpoint.

    Note that the ByteString chunk boundaries are not retained across the network, to achieve application level chunks you have to introduce explicit framing in your streams, for example using the akka.stream.scaladsl.Framing stages.

    TODO: Support idleTimeout as per Tcp.

    remoteAddress

    The remote address to connect to

    localAddress

    Optional local address for the connection

    halfClose

    Controls whether the connection is kept open even after writing has been completed to the accepted socket connections. If set to true, the connection will implement the socket half-close mechanism, allowing the server to write to the connection even after the client has finished writing. The socket is only closed after both the client and server finished writing. This setting is recommended for clients and therefore it is the default setting. If set to false, the connection will immediately closed once the client closes its write side, independently whether the server is still attempting to write.

    Definition Classes
    UnixDomainSocket → UnixDomainSocketImpl
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from UnixDomainSocketImpl

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Ungrouped