This function creates a websocket connection to a remote instance using the Chrome Debugging Protocol.
CDPSession(
host = "localhost",
port = 9222,
secure = FALSE,
ws_url = NULL,
local = FALSE,
callback = NULL
)
Character scalar, the host name of the application.
The remote debugging port (a numeric or a character scalar).
A logical indicating whether a secure protocol shall be used.
Character scalar, the websocket URL. If provided, host
and
port
arguments are ignored.
Logical scalar, indicating whether the local version of the
protocol (embedded in crrri
) must be used or the protocol must be
fetched remotely.
Function with one argument, executed when the R session is connected to Chrome. The connection object is passed to this function.
The returned value depends on the value of the callback
argument.
When callback
is a function, the returned value is a connection object
of class CDPSession
. When callback
is NULL
the returned value is
a promise which becomes fulfilled once R is connected to the remote
instance. Once fulfilled, the value of this promise is the connection
object of class CDPSession
.