object WebSocket
- Source
- WebSocket.scala
- Alphabetic
- By Inheritance
- WebSocket
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
client[F[_], I, O](request: WebSocketRequest, pipe: Pipe[F, Frame[I], Frame[O]], maxHeaderSize: Int = 4096, receiveBufferSize: Int = 256 * 1024, maxFrameSize: Int = 1024*1024, requestCodec: Codec[HttpRequestHeader] = HttpRequestHeaderCodec.defaultCodec, responseCodec: Codec[HttpResponseHeader] = ..., sslStrategy: ⇒ Strategy = ..., sslContext: ⇒ SSLContext = ...)(implicit R: Decoder[I], W: Encoder[O], AG: AsynchronousChannelGroup, F: Async[F], S: Scheduler): Stream[F, Option[HttpResponseHeader]]
Establishes websocket connection to the server.
Establishes websocket connection to the server.
Implementation is according to RFC-6455 (https://tools.ietf.org/html/rfc6455).
If this is established successfully, then this consults
pipe
to receive/sent any frames From/To server. Once the connection finishes, this will emit once None.If the connection was not established correctly (i.e. Authorization failure) this will not consult supplied pipe and instead this will immediately emit response received from the server.
- request
WebSocket request
- pipe
Pipe that is consulted when websocket is established correctly
- maxHeaderSize
Max size of Http Response header received
- receiveBufferSize
Size of receive buffer to use
- maxFrameSize
Maximum size of single websocket frame. If the binary size of single frame is larger than supplied value, websocket will fail.
- requestCodec
Codec to encode HttpRequests Header
- responseCodec
Codec to decode HttpResponse Header
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
server[F[_], I, O](pipe: Pipe[F, Frame[I], Frame[O]], pingInterval: Duration = 30.seconds, handshakeTimeout: FiniteDuration = 10.seconds, maxFrameSize: Int = 1024*1024)(header: HttpRequestHeader, input: Stream[F, Byte])(implicit R: Decoder[I], W: Encoder[O], F: Async[F], S: Scheduler): Stream[F, HttpResponse[F]]
Creates a websocket to be used on server side.
Creates a websocket to be used on server side.
Implementation is according to RFC-6455 (https://tools.ietf.org/html/rfc6455).
- pipe
A websocket pipe.
I
is received from the client andO
is sent to client. Decoder (for I) and Encoder (for O) must be supplied.- pingInterval
An interval for the Ping / Pong protocol.
- handshakeTimeout
An timeout to await for handshake to be successfull. If the handshake is not completed within supplied period, connection is terminated.
- maxFrameSize
Maximum size of single websocket frame. If the binary size of single frame is larger than supplied value, websocket will fail.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- object impl