Learn R Programming

TFX (version 0.1.0)

Reconnect: Reconnect a session that is no longer active

Description

Reconnect will create a new session and update the `id` to the new authenticated id returned by the TrueFX(tm) server.

Usage

Reconnect(x, ...)
"Reconnect" (x, ...)

Arguments

x
an object to be re-connected
...
other args for methods

Value

a TFXsession object of an active/authenticated session.

Details

After roughly 70 seconds, an authenticated TrueFX(tm) session will time-out. Also, a connection made with snapshot=FALSE will be disconnected after it is used once.

A non-active TrueFX(tm) session id is treated like an unauthenticated session.

Examples

Run this code
## Cannot run because there may not be an internet connection
## Not run: 
# ## You must use your username and password instead of JSTrader and Ou812
# sess <- ConnectTrueFX("USD/JPY", username='JSTrader', password='Ou812')
# Disconnect(sess)
# isActive(sess) #FALSE
# Reconnect(sess)
# isActive(sess) #TRUE
# ## End(Not run)

Run the code above in your browser using DataLab