create_connection: create_connection

View source: R/connection.R

create_connectionR Documentation

create_connection

Description

Create a connection to the BOINC server.

Usage

create_connection(server, dir, username, password = NULL, keyfile = NULL)

Arguments

server

a ssh or http server URL of the form <protocol>://<server name>:<port>. Examples:

  • "ssh://boinc-server.local" - for ssh connection;

  • "http://boinc-server.local" - for http connection;

  • "https://boinc-server.local" - for https connection.

dir

a rboinc project directory on the server. For ssh connection, this is the directory where the BOINC project is located. For http/https connection, this is the full path to the project page (without the server name).

username

a string containing username. For ssh connection, this is the user login. For http/https connection, this is the user email.

password

a string containing user password. If this parameter is equal to NULL, then a window will be displayed prompting you to enter the password

keyfile

path to a private key file. For ssh connection only.

Details

This function create a connection to BOINC server. Don't edit the list returned by this function.

Returned object contains valid information only until the end of the current R session, so don't save it to a file. Before ending the session, it is recommended to release the occupied resources by calling close_connection().

ATTENTION: ssh connections are supported but not recommended. If you are the administrator for your BOINC project, see https://boinc.berkeley.edu/trac/wiki/MultiUser for more information on the http BOINC multiuser interface.

Errors and warnings

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

  • for any connections:

    • "Unsupported server address format."

    • "Connection was canceled by user."

    • "Unrecognized protocol: '<protocol>'

  • for http/https connections:

    • "Authorization failed."

  • for ssh connections:

    • "Project directory was not found on server."

Value

A connection (list) for use by other functions.

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.