⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.127
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
DRb
/
DRbProtocol
/
View File Name :
cdesc-DRbProtocol.ri
U:RDoc::NormalModule[iI"DRbProtocol:ETI"DRb::DRbProtocol;T0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"DModule managing the underlying network protocol(s) used by drb.;To:RDoc::Markup::BlankLine o; ;[I"FBy default, drb uses the DRbTCPSocket protocol. Other protocols ;TI"Ican be defined. A protocol must define the following class methods:;T@o:RDoc::Markup::Verbatim;[I"J[open(uri, config)] Open a client connection to the server at +uri+, ;TI"J using configuration +config+. Return a protocol ;TI"7 instance for this connection. ;TI"B[open_server(uri, config)] Open a server listening at +uri+, ;TI"H using configuration +config+. Return a ;TI"E protocol instance for this listener. ;TI"I[uri_option(uri, config)] Take a URI, possibly containing an option ;TI"I component (e.g. a trailing '?param=val'), ;TI"A and return a [uri, option] tuple. ;T:@format0o; ;[ I"GAll of these methods should raise a DRbBadScheme error if the URI ;TI"Ddoes not identify the protocol they support (e.g. "druby:" for ;TI"Gthe standard Ruby protocol). This is how the DRbProtocol module, ;TI"Ggiven a URI, determines which protocol implementation serves that ;TI"protocol.;T@o; ;[I"BThe protocol instance returned by #open_server must have the ;TI"following methods:;T@o:RDoc::Markup::List: @type: LABEL:@items[o:RDoc::Markup::ListItem:@label[I"accept;T;[o; ;[I"@Accept a new connection to the server. Returns a protocol ;TI"7instance capable of communicating with the client.;To;;[I" close;T;[o; ;[I"!Close the server connection.;To;;[I"uri;T;[o; ;[I"!Get the URI for this server.;T@o; ;[I"MThe protocol instance returned by #open must have the following methods:;T@o; ;;;[ o;;[I"'send_request (ref, msg_id, arg, b);T;[o; ;[I"FSend a request to +ref+ with the given message id and arguments. ;TI"IThis is most easily implemented by calling DRbMessage.send_request, ;TI"Aproviding a stream that sits on top of the current protocol.;To;;[I"recv_reply;T;[o; ;[ I"JReceive a reply from the server and return it as a [success-boolean, ;TI"Dreply-value] pair. This is most easily implemented by calling ;TI"@DRb.recv_reply, providing a stream that sits on top of the ;TI"current protocol.;To;;[I"alive?;T;[o; ;[I"$Is this connection still alive?;To;;[I" close;T;[o; ;[I"Close this connection.;T@o; ;[I"IThe protocol instance returned by #open_server().accept() must have ;TI"the following methods:;T@o; ;;;[o;;[I"recv_request;T;[o; ;[ I"FReceive a request from the client and return a [object, message, ;TI"Eargs, block] tuple. This is most easily implemented by calling ;TI"EDRbMessage.recv_request, providing a stream that sits on top of ;TI"the current protocol.;To;;[I"send_reply(succ, result);T;[o; ;[I"BSend a reply to the client. This is most easily implemented ;TI"Dby calling DRbMessage.send_reply, providing a stream that sits ;TI"$on top of the current protocol.;To;;[I" close;T;[o; ;[I"Close this connection.;T@o; ;[I"DA new protocol is registered with the DRbProtocol module using ;TI"the add_protocol method.;T@o; ;[I"HFor examples of other protocols, see DRbUNIXSocket in drb/unix.rb, ;TI"Fand HTTP0 in sample/http0.rb and sample/http0serv.rb in the full ;TI"drb distribution.;T: @fileI"lib/drb/drb.rb;T:0@omit_headings_from_table_of_contents_below0o;;[ ;@;0;0;0[ [ [ [[I" class;T[[:public[ [I"add_protocol;TI"lib/drb/drb.rb;T[I" open;T@[I"open_server;T@[I"uri_option;T@[:protected[ [:private[ [I" instance;T[[;[ [;[ [;[ [@@[@@[@@[@@[ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@I"DRb;TcRDoc::NormalModule