Learn R Programming

RBaseX (version 0.2.4)

SocketClass: SocketClass

Description

Al methods that are used by BasexClient and QueryClass

Arguments

Methods

Public methods

Method new()

Initialize a new socket

Usage

SocketClass$new(host, port = 1984L, username, password)

Arguments

host, port, username, password

Host-information and credentials

Method finalize()

When releasing the session-object, close the socketConnection

Usage

SocketClass$finalize()

Method bool_test_sock()

Return a boolean that indicates the result from the last action on the socket

Usage

SocketClass$bool_test_sock(socket)

Arguments

socket

Socket-ID

Method void_send()

Send input to the socket

Usage

SocketClass$void_send(input)

Arguments

input

Input

Details

Input is either a string or data that is read from a stream

Method str_receive()

Read a string from a stream

Usage

SocketClass$str_receive(input, output, bin = FALSE)

Arguments

input, output

Input- and output-stream

bin

Boolean; TRUE when str_receive has to retrieve binary data

Details

This method is not intented to be called direct

Method get_socket()

Get socket-ID

Usage

SocketClass$get_socket()

Method clone()

The objects of this class are cloneable with this method.

Usage

SocketClass$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.