lc_server_iface: livecode server interface

Description Active bindings Methods

Description

This is a high level, user facing interface class that allows for the creation of a livecode server sharing a specific file. The interface also provides additional tools for sending messages.

Active bindings

url

The current url of the server.

path

The path of the file being served.

Methods

Public methods


Method new()

Creates a new livecode server

Usage
lc_server_iface$new(
  file,
  ip,
  port,
  interval = 2,
  bitly = FALSE,
  auto_save = TRUE,
  open_browser = TRUE
)
Arguments
file

Path to file to broadcast.

ip

ip of the server, defaults to the top result of 'network_interfaces'.

port

port of the server, defaults to a random value.

interval

page update interval in seconds.

bitly

should a bitly bit link be created for the server.

auto_save

should the broadcast file be auto saved update tic.

open_browser

should a browser session be opened.


Method open()

Open server in browser

Usage
lc_server_iface$open()

Method print()

Class print method

Usage
lc_server_iface$print()

Method send_msg()

Send a noty message to all connected users on the next update tic.

Usage
lc_server_iface$send_msg(
  text,
  type = "info",
  theme = "bootstrap-v4",
  layout = "topRight",
  ...,
  parse_md = TRUE
)
Arguments
text

text of the message.

type

message type ('alert', 'success', 'warning', 'error', 'info').

theme

message theme (See [here](https://ned.im/noty/#/themes) for options)

layout

message location.

...

additional noty arguments.

parse_md

should message text be processed as markdown before sending.


Method is_running()

Determine if the server is running.

Usage
lc_server_iface$is_running()
Returns

Returns 'TRUE' if the server is running.


Method start()

Start the server

Usage
lc_server_iface$start()

Method stop()

Stop the server

Usage
lc_server_iface$stop(warn = FALSE)
Arguments
warn

Should the users be sent a warning that the server is shutting down.


Method restart()

Restart the server

Usage
lc_server_iface$restart()

rundel/livecode documentation built on Sept. 10, 2020, 9:19 p.m.