server <- slServer(
port = 50051,
interface = list(long_and_complicated = function(x) {
sendProgress(0,3)
# First part of work that takes some time
# ...
sendProgress(1,3)
# Second part of work that takes some time
# ...
sendProgress(2,3)
# Last part of work that takes some time
# ...
sendProgress(3,3)
})
)
# ...
slStop(server)
Run the code above in your browser using DataLab