Object

scalaz.stream

tcp

Related Doc: package stream

Permalink

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
Visibility
  1. Public
  2. All

Type Members

  1. trait Connection[+A] extends AnyRef

    Permalink

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

  2. trait Socket extends AnyRef

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. lazy val DefaultAsynchronousChannelGroup: AsynchronousChannelGroup

    Permalink
  5. final def asInstanceOf[T0]: T0

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

    Permalink

    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.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. 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]

    Permalink

    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)

  9. def eof: Process[Connection, Nothing]

    Permalink

    Indicate to the peer that we are done writing.

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

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

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

    Permalink

    Evaluate and emit the result of t.

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

    Permalink

    Evaluate and ignore the result of t.

  14. def finalize(): Unit

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

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

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink
  22. def localAddress: Process[Connection, InetSocketAddress]

    Permalink

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

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

    Permalink
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

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

    Permalink

    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.

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

    Permalink

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

  29. def remoteAddress: Process[Connection, InetSocketAddress]

    Permalink

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

  30. 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]]]

    Permalink

    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)

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

    Permalink
    Definition Classes
    AnyRef
  32. object syntax

    Permalink
  33. def toString(): String

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

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

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

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

    Permalink

    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.

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

    Permalink

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

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

    Permalink

    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.

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

    Permalink

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

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped