Packages

class SockJSSocket extends ReadStream[Buffer] with WriteStream[Buffer]

You interact with SockJS clients through instances of SockJS socket.

The API is very similar to io.vertx.scala.core.http.WebSocket. It implements both and so it can be used with io.vertx.scala.core.streams.Pump to pump data with flow control.

Linear Supertypes
WriteStream[Buffer], ReadStream[Buffer], StreamBase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SockJSSocket
  2. WriteStream
  3. ReadStream
  4. StreamBase
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SockJSSocket(_asJava: 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asJava: AnyRef
    Definition Classes
    SockJSSocket → WriteStream → ReadStream → StreamBase
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def close(): Unit

    Close it

  8. def close(statusCode: Int, reason: String): Unit

    Close it giving a status code and reason.

    Close it giving a status code and reason. Only Applicable to RawWebSocket will downgrade to plain close for other transports.

  9. def drainHandler(handler: Handler[Unit]): SockJSSocket
    Definition Classes
    SockJSSocket → WriteStream
  10. def end(): Unit

    Call io.vertx.scala.ext.web.handler.sockjs.SockJSSocket#end.

  11. def end(t: Buffer): Unit
    Definition Classes
    SockJSSocket → WriteStream
  12. def endHandler(endHandler: Handler[Unit]): SockJSSocket
    Definition Classes
    SockJSSocket → ReadStream
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def exceptionHandler(handler: Handler[Throwable]): SockJSSocket
    Definition Classes
    SockJSSocket → WriteStream → ReadStream → StreamBase
  16. def fetch(arg0: Long): ReadStream[Buffer]
    Definition Classes
    SockJSSocket → ReadStream
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def handler(handler: Handler[Buffer]): SockJSSocket
    Definition Classes
    SockJSSocket → ReadStream
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def headers(): MultiMap

    Return the headers corresponding to the last request for this socket or the websocket handshake Any cookie headers will be removed for security reasons

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def localAddress(): SocketAddress

    Return the local address for this socket

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. def pause(): SockJSSocket
    Definition Classes
    SockJSSocket → ReadStream
  28. def pipe(): Pipe[Buffer]
    Definition Classes
    SockJSSocket → ReadStream
  29. def pipeTo(dst: WriteStream[Buffer], handler: Handler[AsyncResult[Unit]]): Unit
    Definition Classes
    SockJSSocket → ReadStream
  30. def pipeTo(dst: WriteStream[Buffer]): Unit
    Definition Classes
    SockJSSocket → ReadStream
  31. def pipeToFuture(dst: WriteStream[Buffer]): Future[Unit]
    Definition Classes
    SockJSSocket → ReadStream
  32. def remoteAddress(): SocketAddress

    Return the remote address for this socket

  33. def resume(): SockJSSocket
    Definition Classes
    SockJSSocket → ReadStream
  34. def setWriteQueueMaxSize(maxSize: Int): SockJSSocket
    Definition Classes
    SockJSSocket → WriteStream
  35. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. def uri(): String

    Return the URI corresponding to the last request for this socket or the websocket handshake

  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  41. def webSession(): Option[Session]

    returns

    the Vert.x-Web session corresponding to this socket

  42. def webUser(): Option[User]

    returns

    the Vert.x-Web user corresponding to this socket

  43. def write(data: String): SockJSSocket

    Write a String to the socket, encoded in UTF-8.

    Write a String to the socket, encoded in UTF-8. * @param data the string to write

    returns

    a reference to this, so the API can be used fluently

  44. def write(data: Buffer): SockJSSocket
    Definition Classes
    SockJSSocket → WriteStream
  45. def writeHandlerID(): String

    When a SockJSSocket is created it automatically registers an event handler with the event bus, the ID of that handler is given by writeHandlerID.

    When a SockJSSocket is created it automatically registers an event handler with the event bus, the ID of that handler is given by writeHandlerID.

    Given this ID, a different event loop can send a buffer to that event handler using the event bus and that buffer will be received by this instance in its own event loop and written to the underlying socket. This allows you to write data to other sockets which are owned by different event loops.

  46. def writeQueueFull(): Boolean
    Definition Classes
    SockJSSocket → WriteStream

Inherited from WriteStream[Buffer]

Inherited from ReadStream[Buffer]

Inherited from StreamBase

Inherited from AnyRef

Inherited from Any

Ungrouped