Packages

final class UnixDomainSocket extends UnixDomainSocketImpl

Provides Unix Domain Socket functionality to Pekko 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. Protected

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 pekko.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 pekko.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(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def logSource: Class[_]

    Override to customise reported log source

    Override to customise reported log source

    Attributes
    protected
    Definition Classes
    UnixDomainSocketImpl
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. 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 pekko.stream.scaladsl.Framing stages.

  19. 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 pekko.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
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from UnixDomainSocketImpl

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Ungrouped