reconnecting-websocket


License

License

MIT
Categories

Categories

Net
GroupId

GroupId

net.leibman
ArtifactId

ArtifactId

reconnecting-websocket_sjs0.6_2.11
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

reconnecting-websocket
reconnecting-websocket
Project URL

Project URL

https://github.com/rleibman/scalajs-reconnecting-websocket
Project Organization

Project Organization

net.leibman
Source Code Management

Source Code Management

https://github.com/rleibman/scalajs-reconnecting-websocket

Download reconnecting-websocket_sjs0.6_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/net.leibman/reconnecting-websocket_sjs0.6_2.11/ -->
<dependency>
    <groupId>net.leibman</groupId>
    <artifactId>reconnecting-websocket_sjs0.6_2.11</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/net.leibman/reconnecting-websocket_sjs0.6_2.11/
implementation 'net.leibman:reconnecting-websocket_sjs0.6_2.11:1.0.1'
// https://jarcasting.com/artifacts/net.leibman/reconnecting-websocket_sjs0.6_2.11/
implementation ("net.leibman:reconnecting-websocket_sjs0.6_2.11:1.0.1")
'net.leibman:reconnecting-websocket_sjs0.6_2.11:jar:1.0.1'
<dependency org="net.leibman" name="reconnecting-websocket_sjs0.6_2.11" rev="1.0.1">
  <artifact name="reconnecting-websocket_sjs0.6_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.leibman', module='reconnecting-websocket_sjs0.6_2.11', version='1.0.1')
)
libraryDependencies += "net.leibman" % "reconnecting-websocket_sjs0.6_2.11" % "1.0.1"
[net.leibman/reconnecting-websocket_sjs0.6_2.11 "1.0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.8
org.scala-js : scalajs-library_2.11 jar 0.6.8
org.scala-js : scalajs-dom_sjs0.6_2.11 jar 0.9.0

provided (2)

Group / Artifact Type Version
org.scoverage : scalac-scoverage-runtime_2.11 jar 1.1.1
org.scoverage : scalac-scoverage-plugin_2.11 jar 1.1.1

Project Modules

There are no modules declared in this project.

scalajs-reconnecting-websocket

Utilities for interacting with websockets in scalajs

install

Add the following to your sbt build definition

libraryDependencies += "net.leibman" %%% "reconnecting-websocket" % "1.2.0"

Usage:

Super simple, just instantiate in your app an instance of the ReconnectingWebsocket:

	val ws = new ReconnectingWebsocket(s"wss://${window.location.host}/processStatusUpdate",
	debug = true,
  	onMessage = { event 
		val msg = read[ProcessUpdateMessage](event.data.toString)
      	println(s"Websocket: We got a message! ${msg}")
      	refresh.runNow()
  })

Versions

Version
1.0.1