monitor | R Documentation |
This function monitors pipe additions and removals from a socket.
monitor(sock, cv)
read_monitor(x)
sock |
a Socket. |
cv |
a 'conditionVariable'. |
x |
a Monitor. |
For monitor
: a Monitor (object of class 'nanoMonitor').
For read_monitor
: an integer vector of pipe IDs (positive if added,
negative if removed), or else NULL if there were no changes since the
previous read.
cv <- cv()
s <- socket("poly")
s1 <- socket("poly")
m <- monitor(s, cv)
m
listen(s)
dial(s1)
cv_value(cv)
read_monitor(m)
close(s)
close(s1)
read_monitor(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.