scalaz.stream

tcp

object tcp

Source
tcp.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. tcp
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait Connection[+A] extends AnyRef

    A Task[A] which has access to an Socket, for reading/writing from some network resource.

  2. trait Socket extends AnyRef

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. lazy val DefaultAsynchronousChannelGroup: AsynchronousChannelGroup

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def available(maxBytes: Int, timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Option[ByteVector]]

    Read up to numBytes from the peer.

    Read up to numBytes from the peer. If timeout is provided and no data arrives within the specified duration, the returned Process fails with a java.nio.channels.InterruptedByTimeoutException. If allowPeerClosed is true, abrupt termination by the peer is converted to None rather than being raised as an exception.

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def connect[A](to: InetSocketAddress, reuseAddress: Boolean = true, sendBufferSize: Int = 256 * 1024, receiveBufferSize: Int = 256 * 1024, keepAlive: Boolean = false, noDelay: Boolean = false)(output: Process[Connection, A])(implicit AG: AsynchronousChannelGroup, S: Strategy): Process[Task, A]

    Process that connects to remote server (TCP) and runs the stream ouput.

    Process that connects to remote server (TCP) and runs the stream ouput.

    to

    Address of remote server

    reuseAddress

    whether address has to be reused (@see java.net.StandardSocketOptions.SO_REUSEADDR)

    sendBufferSize

    size of send buffer (@see java.net.StandardSocketOptions.SO_SNDBUF)

    receiveBufferSize

    size of receive buffer (@see java.net.StandardSocketOptions.SO_RCVBUF)

    keepAlive

    whether keep-alive on tcp is used (@see java.net.StandardSocketOptions.SO_KEEPALIVE)

    noDelay

    whether tcp no-delay flag is set (@see java.net.StandardSocketOptions.TCP_NODELAY)

  11. def eof: Process[Connection, Nothing]

    Indicate to the peer that we are done writing.

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def eval[A](t: Task[A]): Process[Connection, A]

    Evaluate and emit the result of t.

  15. def eval_[A](t: Task[A]): Process[Connection, Nothing]

    Evaluate and ignore the result of t.

  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. def lastWrites(chunks: Process[Connection, ByteVector], timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Unit]

    Defined as tcp.writes(chunks,timeout,allowPeerClosed) onComplete eof.

  21. def lastWrites_(chunks: Process[Connection, ByteVector], timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Nothing]

    Like scalaz.stream.tcp.lastWrites, but ignores the output.

  22. def lift[A](p: Process[Task, A]): Process[Connection, A]

    Lift a regular Process to operate in the context of a Connection.

  23. def local[A](f: (Socket) ⇒ Socket)(p: Process[Connection, A]): Process[Connection, A]

  24. def localAddress: Process[Connection, InetSocketAddress]

    Returns a single-element stream containing the local address of the connection.

  25. def merge[A](a: Process[Connection, A], a2: Process[Connection, A])(implicit S: Strategy): Process[Connection, A]

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def read(numBytes: Int, timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Option[ByteVector]]

    Read exactly numBytes from the peer in a single chunk.

    Read exactly numBytes from the peer in a single chunk. If timeout is provided and no data arrives within the specified duration, the returned Process fails with a java.nio.channels.InterruptedByTimeoutException.

  30. def reads(maxChunkBytes: Int, timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, ByteVector]

    Read a stream from the peer in chunk sizes up to maxChunkBytes bytes.

  31. def remoteAddress: Process[Connection, InetSocketAddress]

    Returns a single-element stream containing the remote address of the peer.

  32. def server[A](bind: InetSocketAddress, concurrentRequests: Int, maxQueued: Int = 0, reuseAddress: Boolean = true, receiveBufferSize: Int = 256 * 1024)(handler: Process[Connection, A])(implicit AG: AsynchronousChannelGroup, S: Strategy): Process[Task, Process[Task, \/[Throwable, A]]]

    Process that binds to supplied address and handles incoming TCP connections using the specified handler.

    Process that binds to supplied address and handles incoming TCP connections using the specified handler. The stream of handler results is returned, along with any errors. The outer stream scopes the lifetime of the server socket. When the returned process terminates, all open connections will terminate as well.

    bind

    address to which this process has to be bound

    concurrentRequests

    the number of requests that may be processed simultaneously, must be positive

    reuseAddress

    whether address has to be reused (@see java.net.StandardSocketOptions.SO_REUSEADDR)

    receiveBufferSize

    size of receive buffer (@see java.net.StandardSocketOptions.SO_RCVBUF)

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  34. object syntax

  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def write(bytes: ByteVector, timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Unit]

    Write bytes to the peer.

    Write bytes to the peer. If timeout is provided and the operation does not complete in the specified duration, the returned Process fails with a java.nio.channels.InterruptedByTimeoutException.

  40. def write_(bytes: ByteVector, timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Nothing]

    Like scalaz.stream.tcp.write, but ignores the output.

  41. def writes(chunks: Process[Connection, ByteVector], timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Unit]

    Write a stream of chunks to the peer.

    Write a stream of chunks to the peer. Emits a single Unit value for each chunk written.

  42. def writes_(chunks: Process[Connection, ByteVector], timeout: Option[Duration] = None, allowPeerClosed: Boolean = false): Process[Connection, Nothing]

    Like scalaz.stream.tcp.writes, but ignores the output.

  43. def wye[A, B, C](a: Process[Connection, A], b: Process[Connection, B])(y: Wye[A, B, C])(implicit S: Strategy): Process[Connection, C]

Inherited from AnyRef

Inherited from Any

Ungrouped