Package 'RcppAsioExample'

Title: A Simple Example of Using 'Asio' from 'R' via 'Rcpp'
Description: The 'AsioHeader' packages brings the 'Asio' library in a header-only format to R. This package illustrates its use via a simple example, and be used as a test whether all relevant packages are correctly setup to allow compilation.
Authors: Dirk Eddelbuettel
Maintainer: Dirk Eddelbuettel <[email protected]>
License: GPL (>= 2)
Version: 0.0.1.1
Built: 2024-07-12 05:17:12 UTC
Source: https://github.com/eddelbuettel/rcppasioexample

Help Index


A Simple Example of Using 'Asio' from 'R' via 'Rcpp'

Description

The 'AsioHeader' packages brings the 'Asio' library in a header-only format to R. This package illustrates its use via a simple example, and be used as a test whether all relevant packages are correctly setup to allow compilation.

Maintainer

Dirk Eddelbuettel <[email protected]>

Author(s)

Dirk Eddelbuettel


Example Asio application

Description

This function implements a very simple http client. It follows the http_client.cpp example in the Asio documentation but has been adapted to be used as an example function here.

Usage

httpClient(host, path)

Arguments

host

A character variable with an internet host name

path

A character variable with an accessible path

Value

Nothing is returned as the function is invoked for its a side-effect of display what is retrieved.

Examples

## Not run: 
## now commented-out / inactive as the redirect upsets R's own checking
httpClient("www.apache.org", "/robots.txt")

## End(Not run)