Learn R Programming

RBaseX (version 0.3.0)

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()

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(bin = FALSE)

Arguments

bin

Logical; TRUE when str_receive has to retrieve binary data

Method write_Byte()

Write 1 byte to the socket

Usage

SocketClass$write_Byte(Byte)

Arguments

Byte

A vector length 1

Method read_Byte()

Read 1 byte to the socket

Usage

SocketClass$read_Byte()

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.