1. R1 invokes receiveSocketObject(NNNNN)
, where NNNNN is an
available port number on R1's localhost. (Use
availablePort
to find a port number.) The R1
session hangs until:
2. R2 invokes sendSocketObject(object, "somehost.somewhere.com", NNNNN)
to send object
to R1. If R1 is not listening on port NNNNN
already, this operation will hang R2 until R1 invokes
receiveSocketObject(NNNNN)
to start listening there.
3. R1 and R2 both return after object
has been sent, with
receiveSocketObject
on R1 returning the object that was sent.
sendSocketObject(object, host, port)
receiveSocketObject(port)
object
is being sentreceiveSocketObject()
returns the object sent.sendSocketObject
opens a blocking binary client socket
connection to the given host
and port
, serializes
object
onto the connection, then closes it. receiveSocketObject
listens on a blocking binary server socket
and returns the Robject sent over it.
availablePort
to find a port number, and
startRemoteServer
to run a server that accepts Rcommands
over a socket and returns the resulting Robjects