Learn R Programming

svSocket (version 1.0.0)

socketClientConnection: Open a connection to a SciViews socket client for write access

Description

A 'sockclientconn' object is created that opens a connection from R to a SciViews socket client (that must be currently connected).

Usage

socketClientConnection(
  client,
  serverport = 8888,
  socket,
  blocking = FALSE,
  open = "a",
  encoding = getOption("encoding")
)

# S3 method for sockclientconn summary(object, ...)

Arguments

client

the client identification. By default, it is the socket identifier as it appears in getSocketClients(). The client must be currently connected.

serverport

the port on which the server is running, 8888 by default. This server must be currently running.

socket

the Tcl socket name where the targeted client is connected. If not provided, it will be guessed from client, otherwise, client is ignored.

blocking

logical. Should the connection wait that the data is written before exiting?

open

character. How the connection is opened. Currently, only "a" for append (default) or "w" for write access are usable.

encoding

the name of the encoding to use.

object

A 'sockclientconn' object as returned by socketClientConnection().

...

further arguments passed to the method (not used for the moment).

Value

socketClientConnection() creates a 'sockclientconn' object redirects text send to it to the SciViews socket server client. It is inherits from a 'sockconn' object (see socketConnection()), and the only difference is that output is redirected to a Tcl socket corresponding to a given SciViews socket client currently connected.

See Also

socketConnection(), sendSocketClients()