Class

DRb::DRbTCPSocket

Inheritance
< Object

The default drb protocol.

Communicates over a TCP socket.

Attributes

Name Visibility R/W Description
uri public R Get the URI that we are connected to.

Methods

Class

Visibility Signature
public getservername ()
public new (uri, soc, config={})
public open (uri, config)
public open_server (uri, config)
public open_server_inaddr_any (host, port)
public uri_option (uri, config)

Instance

Visibility Signature
public accept ()
public alive? ()
public close ()
public peeraddr ()
public recv_reply ()
public recv_request ()
public send_reply (succ, result)
public send_request (ref, msg_id, arg, b)
public stream ()

Class Method Detail

getservername()

new(uri, soc, config={})

Create a new DRbTCPSocket instance.

uri is the URI we are connected to. soc is the tcp socket we are bound to. config is our configuration.

open(uri, config)

Open a client connection to uri using configuration config.

open_server(uri, config)

Open a server listening for connections at uri using configuration config.

open_server_inaddr_any(host, port)

uri_option(uri, config)

Parse uri into a [uri, option] pair.

Instance Method Detail

accept()

On the server side, for an instance returned by open_server, accept a client connection and return a new instance to handle the server‘s side of this client-server session.

alive?()

Check to see if this connection is alive.

close()

Close the connection.

If this is an instance returned by open_server, then this stops listening for new connections altogether. If this is an instance returned by open or by accept, then it closes this particular client-server session.

peeraddr()

Get the address of our TCP peer (the other end of the socket we are bound to.

recv_reply()

On the client side, receive a reply from the server.

recv_request()

On the server side, receive a request from the client.

send_reply(succ, result)

On the server side, send a reply to the client.

send_request(ref, msg_id, arg, b)

On the client side, send a request to the server.

stream()

Get the socket.