class
WebSocket extends Logging
Instance Constructors
-
new
WebSocket(client: AsyncHttpClient)
Type Members
-
type
OnBinaryMessageHandler = (Array[Byte]) ⇒ Unit
-
type
OnErrorHandler = (Throwable) ⇒ Unit
-
type
OnTextMessageHandler = (String) ⇒ Unit
-
type
OnWebSocketOperationHandler = (WebSocket) ⇒ Unit
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
-
final
def
isInstanceOf[T0]: Boolean
-
lazy val
logger: Logger
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
onBinaryMessage(handler: (Array[Byte]) ⇒ Unit): WebSocket
-
-
def
onError(handler: (Throwable) ⇒ Unit): WebSocket
-
-
def
onTextMessage(handler: (String) ⇒ Unit): WebSocket
-
def
open(url: String): WebSocket
-
def
removeOnBinaryMessage(handler: (Array[Byte]) ⇒ Unit): WebSocket
-
def
removeOnClose(handler: (WebSocket) ⇒ Unit): WebSocket
-
def
removeOnError(handler: (Throwable) ⇒ Unit): WebSocket
-
def
removeOnOpen(handler: (WebSocket) ⇒ Unit): WebSocket
-
def
removeOnTextMessage(handler: (String) ⇒ Unit): WebSocket
-
def
send(message: Array[Byte]): WebSocket
-
def
sendText(message: String): WebSocket
-
def
shutdown(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from Logging
Inherited from AnyRef
Inherited from Any
WebSocket wrapper for com.ning.http.client.AsyncHttpClient
This is a thin wrapper for com.ning.http.client.AsyncHttpClient that exposes a functional API for attaching handlers to events that com.ning.http.client.AsyncHttpClient exposes.
You can chain nearly every method in this class. The single exception is the shutdown() method, which ends the life of this websocket. After executing it, you need to create a new instance of scalawebsocket.WebSocket