Packages

object impl

Source
SSLSocket.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. impl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class SocketStatus [F[_]](buff: Chunk[Byte], handshakeInProgress: Boolean, notifyHandshakeDone: Vector[F[Unit]]) extends Product with Serializable

    Status of the socket

    Status of the socket

    buff

    Remaining data that was acquired during handshaking but were not consumed by any read operation

    handshakeInProgress

    indication that handshake is in progress.

    notifyHandshakeDone

    If handshakeInProgress is true, this contains all operations to be notified when handshake is done.

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. def acquireFromBuffer[F[_]](max: Int, statusRef: Ref[F, SocketStatus[F]])(implicit F: Async[F]): F[Chunk[Byte]]

    Acquires up to max bytes from the chunk in buffer.

    Acquires up to max bytes from the chunk in buffer. May return empty chunk

  5. def appendToBuffer[F[_]](chunk: Chunk[Byte], statusRef: Ref[F, SocketStatus[F]])(implicit F: Async[F]): F[Unit]
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def awaitHandshakeComplete[F[_]](statusRef: Ref[F, SocketStatus[F]])(implicit F: Async[F]): F[Unit]

    Invoked when handshake shall be in process and shall finish when handshake is complete

  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def concat(a: Chunk[Byte], b: Chunk[Byte]): Chunk[Byte]

    concats a, b if they are nonempty *

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  19. def performHandshake[F[_]](socket: Socket[F], sslEngine: SSLEngine[F], statusRef: Ref[F, SocketStatus[F]], handshakeTimeout: Option[FiniteDuration], writeSemaphore: Semaphore[F], readSemaphore: Semaphore[F])(implicit F: Async[F]): F[Unit]

    Perform SSL handshake.

    Perform SSL handshake. This completes when handshake is complete and will trigger all handshake awaiting tasks to be run.

    socket

    Socket to send/receive raw data

    sslEngine

    SSL engine

    statusRef

    Status reference to acquire handshake lock and register for callback

    handshakeTimeout

    Timeout to perform the handshake

  20. def read[F[_]](socket: Socket[F], sslEngine: SSLEngine[F], maxSize: Int, timeout: Option[FiniteDuration], statusRef: Ref[F, SocketStatus[F]], writeSemaphore: Semaphore[F], readSemaphore: Semaphore[F])(implicit F: Async[F]): F[Option[Chunk[Byte]]]

    Perform read operation of up to maxSize bytes.

    Perform read operation of up to maxSize bytes.

    May return None indicating EOF. If handshake needs to be done during the read process, this will perform that handshake before returning.

    socket

    Socket to use to receive data

    sslEngine

    SSL Engine

    maxSize

    Max size of data to return (may be less or empty)

    timeout

    Timeout to await the read operation

    statusRef

    A reference to state

    writeSemaphore

    Write semaphore guarding any writed

    readSemaphore

    Read semaphore guarding any reads

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def write[F[_]](socket: Socket[F], sslEngine: SSLEngine[F], bytes: Chunk[Byte], timeout: Option[FiniteDuration], statusRef: Ref[F, SocketStatus[F]], writeSemaphore: Semaphore[F], readSemaphore: Semaphore[F])(implicit F: Async[F]): F[Unit]

    Write supplied data to the destination socket.

    Write supplied data to the destination socket.

    When the handshake is in process, this will complete _AFTER_ handshake is complete.

    socket

    Socket to write encrypted data to

    sslEngine

    SSLEngine to use

    bytes

    bytes to write

    timeout

    A timeout to write the data

  27. object SocketStatus extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped