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, handshakeTimeout: FiniteDuration = 10.seconds, maxHeaderSize: Int = 4096, maxFrameSize: Int = 1024*1024, requestCodec: Codec[HttpRequestHeader] = HttpRequestHeaderCodec.defaultCodec, responseCodec: Codec[HttpResponseHeader] = ...)(onConnect: (HttpResponseHeader) ⇒ Pipe[F, Frame[I], Frame[O]])(implicit arg0: Async[F], arg1: RaiseThrowable[F], arg2: Network[F], arg3: TLSContext[F], arg4: Decoder[I], arg5: Encoder[O]): 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
onConnect
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
- handshakeTimeout
Timeout to establish initial websocket handshake before giving up
- maxHeaderSize
Max size of Http Response header received
- 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
- onConnect
Pipe that is consulted when websocket is established correctly
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
server[F[_], I, O](pingInterval: Duration = 30.seconds, handshakeTimeout: FiniteDuration = 10.seconds, maxFrameSize: Int = 1024*1024)(pipe: Pipe[F, Frame[I], Frame[O]])(implicit arg0: Async[F], arg1: Decoder[I], arg2: Encoder[O]): Service[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).
- 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.
- 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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- object impl