close_connection: close_connection

View source: R/connection.R

close_connectionR Documentation

close_connection

Description

Disconnect from the server.

Usage

close_connection(connection)

Arguments

connection

a connection created by create_connection().

Details

This function closes the connection to the BOINC server and frees up busy resources. In the case of ssh, it just calls the ssh_disconnect() function from the ssh package. In the case of the http/https interface, it looks for a link to the exit page on the home page and follows it.

Errors and warnings

When errors occur, execution can be stopped with the following messages:

  • for http/https connections:

    • "Already disconnected."

Examples

## Not run: 

# For ssh connection:
con = create_connection(server = "ssh://boinc.local",
                        dir = "~/projects/myproject",
                        username = "boincadm",
                        password = "0000")

# For http connections:
con = create_connection(server = "http://boinc.local",
                        dir = "myproject",
                        username = "submitter@example.com",
                        password = "000000")

# For https connections:
con = create_connection(server = "https://boinc.local",
                        dir = "myproject",
                        username = "submitter@example.com",
                        password = "000000")
...

# Release resources:
close_connection(con)

## End(Not run)

RBOINC.cl documentation built on Nov. 15, 2022, 3 a.m.