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

    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: 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. lazy val DefaultAsynchronousChannelGroup: AsynchronousChannelGroup
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. 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.

  7. def clone(): AnyRef
    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]

    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]

    Indicate to the peer that we are done writing.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def eval[A](t: Task[A]): Process[Connection, A]

    Evaluate and emit the result of t.

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

    Evaluate and ignore the result of t.

  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. 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.

  19. 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.

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

    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]
  22. def localAddress: Process[Connection, InetSocketAddress]

    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]
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  27. 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.

  28. 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.

  29. def remoteAddress: Process[Connection, InetSocketAddress]

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

    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
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. 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.

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

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

  38. 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.

  39. 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.

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

Inherited from AnyRef

Inherited from Any

Ungrouped