Create a new DRbServer instance.
uri
is the URI
to bind to. This is normally of the form ‘druby://<hostname>:<port>’ where <hostname> is a hostname of the local machine. If nil, then the system’s default hostname will be bound to, on a port selected by the system; these value can be retrieved from the uri
attribute. ‘druby:’ specifies the default dRuby transport protocol: another protocol, such as ‘drbunix:’, can be specified instead.
front
is the front object for the server, that is, the object to which remote method calls on the server will be passed. If nil, then the server will not accept remote method calls.
If config_or_acl
is a hash, it is the configuration to use for this server. The following options are recognised:
an id-to-object conversion object. This defaults to an instance of the class DRb::DRbIdConv
.
if true, all unsuccessful remote calls on objects in the server will be logged to $stdout. false by default.
the access control list for this server. See the ACL
class from the main dRuby distribution.
the maximum message size in bytes accepted by the server. Defaults to 25 MB (26214400).
the maximum number of arguments to a remote method accepted by the server. Defaults to 256.
The default values of these options can be modified on a class-wide basis by the class methods default_argc_limit, default_load_limit, default_acl, default_id_conv, and verbose=
If config_or_acl
is not a hash, but is not nil, it is assumed to be the access control list for this server. See the :tcp_acl option for more details.
If no other server is currently set as the primary server, this will become the primary server.
The server will immediately start running in its own thread.
Create a new remote object stub.
obj
is the (local) object we want to create a stub for. Normally this is nil
. uri
is the URI
of the remote object that this will be a stub for.
Creates a new GW
Create a DRb::DRbSSLSocket
instance.
uri
is the URI
we are connected to. soc
is the tcp socket we are bound to. config
is our configuration. Either a Hash
or SSLConfig
is_established
is a boolean of whether soc
is currently established
This is called automatically based on the DRb
protocol.
Creates a new TimerIdConv
which will hold objects for keeping
seconds.
Creates a new StringInputMethod
object
Constructs the eigenvalue decomposition for a square matrix A
Creates and returns a new FTP
object. If a host
is given, a connection is made.
options
is an option hash, each key of which is a symbol.
The available options are:
Port number (default value is 21)
If options is true, then an attempt will be made to use SSL (now TLS) to connect to the server. For this to work OpenSSL
[OSSL] and the Ruby OpenSSL
[RSSL] extensions need to be installed. If options is a hash, it’s passed to OpenSSL::SSL::SSLContext#set_params
as parameters.
If true, TLS is used for data connections. Default: true
when options is true.
Username for login. If options is the string “anonymous” and the options is nil
, “anonymous@” is used as a password.
Password for login.
Account information for ACCT.
When true
, the connection is in passive mode. Default: true
.
open_timeout
Number of seconds to wait for the connection to open. See Net::FTP#open_timeout
for details. Default: nil
.
read_timeout
Number of seconds to wait for one block to be read. See Net::FTP#read_timeout
for details. Default: 60
.
ssl_handshake_timeout
Number of seconds to wait for the TLS handshake. See Net::FTP#ssl_handshake_timeout
for details. Default: nil
.
use_pasv_ip
When true
, use the IP address in PASV responses. Otherwise, it uses the same IP address for the control connection. Default: false
.
debug_mode
When true
, all traffic to and from the server is written to +$stdout+. Default: false
.
Creates a new Net::HTTP
object without opening a TCP connection or HTTP
session.
The address
should be a DNS hostname or IP address, the port
is the port the server operates on. If no port
is given the default port for HTTP
or HTTPS is used.
If none of the p_
arguments are given, the proxy host and port are taken from the http_proxy
environment variable (or its uppercase equivalent) if present. If the proxy requires authentication you must supply it by hand. See URI::Generic#find_proxy
for details of proxy detection from the environment. To disable proxy detection set p_addr
to nil.
If you are connecting to a custom proxy, p_addr
specifies the DNS name or IP address of the proxy host, p_port
the port to use to access the proxy, p_user
and p_pass
the username and password if authorization is required to use the proxy, and p_no_proxy hosts which do not use the proxy.
Creates an HTTP request object for path
.
initheader
are the default headers to use. Net::HTTP
adds Accept-Encoding to enable compression of the response body unless Accept-Encoding or Range
are supplied in initheader
.
Creates a new Net::IMAP
object and connects it to the specified host
.
options
is an option hash, each key of which is a symbol.
The available options are:
Port number (default value is 143 for imap, or 993 for imaps)
If options is true, then an attempt will be made to use SSL (now TLS) to connect to the server. For this to work OpenSSL
[OSSL] and the Ruby OpenSSL
[RSSL] extensions need to be installed. If options is a hash, it’s passed to OpenSSL::SSL::SSLContext#set_params
as parameters.
open_timeout
Seconds to wait until a connection is opened
The most common errors are:
Connection refused by host
or an intervening firewall.
Connection timed out (possibly due to packets being dropped by an intervening firewall).
There is no route to that network.
SocketError
Hostname not known or other socket error.
Net::IMAP::ByeResponseError
The connected to the host was successful, but it immediately said goodbye.
Creates a new POP3
object.
address
is the hostname or ip address of your POP3
server.
The optional port
is the port to connect to.
The optional isapop
specifies whether this connection is going to use APOP
authentication; it defaults to false
.
This method does not open the TCP connection.