Nothing
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ---- eval = FALSE------------------------------------------------------------
# ws <- WebSocket$new("ws://echo.websocket.org/")
## ---- eval = FALSE------------------------------------------------------------
# ws <- WebSocket$new("ws://echo.websocket.org/", autoConnect = FALSE)
# # Set up callbacks here...
# ws$connect()
## ---- eval = FALSE------------------------------------------------------------
# {
# ws <- WebSocket$new("ws://echo.websocket.org/")
# ws$onOpen(function(event) { message("websocket opened") })
# }
## ---- eval = FALSE------------------------------------------------------------
# {
# ws <- WebSocket$new("ws://echo.websocket.org/")
# ws$onOpen(function(event) {
# cat("connected\n")
# })
# }
## ---- eval = FALSE------------------------------------------------------------
# {
# ws <- WebSocket$new("ws://echo.websocket.org/")
# removeThis <- ws$onMessage(function(event) {
# cat("this is the last time i'll run\n")
# removeThis()
# })
# ws$onOpen(function(event) {
# ws$send("one")
# ws$send("two")
# })
# }
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.