Class NetClient

Superclasses :
util::Connectable
util::Error
util::SetFields
Subclasses :
http::HttpClient
mail::PopClient
mail::SmtpClient
Package :
net

Common base class for a client class which holds a connection to a server and communicates using CRLF-terminated lines.

Source

Class summary
Methods inherited from util::Connectable
connect(obj, meth, type) disconnect(l) fire(type, param) fire_event(e)
Variables inherited from util::Connectable
listeners
Methods inherited from util::Error
error(a) get_reason()
Variables inherited from util::Error
reason
Methods inherited from util::SetFields
as_attrib(attr, val) attrib(a[]) cset_val(attr, val) field_error(s) int_val(attr, val) int_vals(attr, val, n) numeric_val(attr, val) numeric_vals(attr, val, n) set_fields(l) string_val(attr, val) string_vals(attr, val, n) test_flag(attr, val)
Methods defined in this class
close() error_and_close(a) initially() open() read_line() read_str(len) recv(len) send(s) set_one(attr, val) set_port(n) set_server(s) set_timeout(timeout) write_line(s) write_str(s)
Variables defined in this class
connection port sbuff server timeout

Method detail

close()

Close the connection
Source

error_and_close(a)

Private method, not intended for client invocation

initially()

Overrides initially() in util::Connectable

open()

Open the connection.
Source

read_line()

Private method, not intended for client invocation

read_str(len)

Read up to len bytes on the connection.
Source

recv(len)

Private method, not intended for client invocation

send(s)

Private method, not intended for client invocation

set_one(attr, val)

Overrides set_one(attr, val) in util::SetFields
Source

set_port(n)

Set the port.
Source

set_server(s)

Set the server to use
Source

set_timeout(timeout)

Set the timeout in ms to use. If a figure of zero, or &null, is given (the default) then no timeout will be used.
Source

write_line(s)

Private method, not intended for client invocation

write_str(s)

Write the given string to the connection.
Source

Variable detail

connection


port


sbuff


server


timeout