Socket

Description

Creates a TCP/IP connection, or establishes a TCP/IP server.

Properties

connected readonly When true, the connection is active.
encoding readonly Sets or retrieves the name of the encoding used to transmit data.
eof readonly When true, the receive buffer is empty.
error readonly A message describing the most recent error. Setting this value clears any error message.
host readonly The name of the remote computer when a connection is established.
timeout readonly The timeout in seconds to be applied to read or write operations.

Constructors

Socket readonly Creates a new Socket object.

Methods

close readonly Terminates the open connection.
listen readonly Instructs the object to start listening for an incoming connection.
open readonly Opens the connection for subsequent read/write operations.
poll readonly Checks a listening object for a new incoming connection.
read readonly Reads up to the specified number of characters from the connection. CR characters are ignored unless the encoding is set to “BINARY”.
readln readonly Reads one line of text up to the next line feed.
write readonly Concatenates all arguments into a single string and writes that string to the connection.
writeln readonly Concatenates all arguments into a single string, appends a LF character, and writes that string to the connection.