This function monitors pipe additions and removals from a socket.
Usage
monitor(sock, cv)
read_monitor(x)
Value
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.