Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.217.145
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby20 /
share /
ri /
2.0.0 /
system /
GServer /
Delete
Unzip
Name
Size
Permission
Date
Action
audit-i.ri
392
B
-rw-r--r--
2023-07-26 17:38
cdesc-GServer.ri
3.83
KB
-rw-r--r--
2023-07-26 17:38
connecting-i.ri
620
B
-rw-r--r--
2023-07-26 17:38
connections-i.ri
322
B
-rw-r--r--
2023-07-26 17:38
debug-i.ri
295
B
-rw-r--r--
2023-07-26 17:38
disconnecting-i.ri
537
B
-rw-r--r--
2023-07-26 17:38
error-i.ri
565
B
-rw-r--r--
2023-07-26 17:38
host-i.ri
285
B
-rw-r--r--
2023-07-26 17:38
in_service%3f-c.ri
694
B
-rw-r--r--
2023-07-26 17:38
join-i.ri
289
B
-rw-r--r--
2023-07-26 17:38
log-i.ri
539
B
-rw-r--r--
2023-07-26 17:38
maxConnections-i.ri
333
B
-rw-r--r--
2023-07-26 17:38
new-c.ri
987
B
-rw-r--r--
2023-07-26 17:38
port-i.ri
287
B
-rw-r--r--
2023-07-26 17:38
serve-i.ri
228
B
-rw-r--r--
2023-07-26 17:38
shutdown-i.ri
304
B
-rw-r--r--
2023-07-26 17:38
start-i.ri
615
B
-rw-r--r--
2023-07-26 17:38
starting-i.ri
335
B
-rw-r--r--
2023-07-26 17:38
stdlog-i.ri
305
B
-rw-r--r--
2023-07-26 17:38
stop-c.ri
614
B
-rw-r--r--
2023-07-26 17:38
stop-i.ri
277
B
-rw-r--r--
2023-07-26 17:38
stopped%3f-i.ri
309
B
-rw-r--r--
2023-07-26 17:38
stopping-i.ri
337
B
-rw-r--r--
2023-07-26 17:38
Save
Rename
U:RDoc::NormalClass[iI"GServer:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[ I"LGServer implements a generic server, featuring thread pool management, ;TI"Esimple logging, and multi-server management. See HttpServer in ;TI"R<tt>xmlrpc/httpserver.rb</tt> in the Ruby standard library for an example of ;TI"GServer in action.;To:RDoc::Markup::BlankLine o; ;[I"OAny kind of application-level server can be implemented using this class. ;TI"RIt accepts multiple simultaneous connections from clients, up to an optional ;TI"Pmaximum number. Several _services_ (i.e. one service per TCP port) can be ;TI"Jrun simultaneously, and stopped at any time through the class method ;TI"P<tt>GServer.stop(port)</tt>. All the threading issues are handled, saving ;TI"Qyou the effort. All events are optionally logged, but you can provide your ;TI"$own event handlers if you wish.;T@S:RDoc::Markup::Heading: leveli: textI"Example;T@o; ;[I"PUsing GServer is simple. Below we implement a simple time server, run it, ;TI"9query it, and shut it down. Try this code in +irb+:;T@o:RDoc::Markup::Verbatim;[$I"require 'gserver' ;TI" ;TI"# ;TI"=# A server that returns the time in seconds since 1970. ;TI"# ;TI" class TimeServer < GServer ;TI") def initialize(port=10001, *args) ;TI" super(port, *args) ;TI" end ;TI" def serve(io) ;TI" io.puts(Time.now.to_i) ;TI" end ;TI" end ;TI" ;TI"E# Run the server with logging enabled (it's a separate thread). ;TI"server = TimeServer.new ;TI"=server.audit = true # Turn logging on. ;TI"server.start ;TI" ;TI"R# *** Now point your browser to http://localhost:10001 to see it working *** ;TI" ;TI""# See if it's still running. ;TI"4GServer.in_service?(10001) # -> true ;TI"5server.stopped? # -> false ;TI" ;TI"(# Shut the server down gracefully. ;TI"server.shutdown ;TI" ;TI"+# Alternatively, stop it immediately. ;TI"GServer.stop(10001) ;TI"%# or, of course, "server.stop". ;T:@format0o; ;[I"OAll the business of accepting connections and exception handling is taken ;TI"Rcare of. All we have to do is implement the method that actually serves the ;TI"client.;T@S;;i; I" Advanced;T@o; ;[ I"MAs the example above shows, the way to use GServer is to subclass it to ;TI"Pcreate a specific server, overriding the +serve+ method. You can override ;TI"Oother methods as well if you wish, perhaps to collect statistics, or emit ;TI"more detailed logging.;T@o:RDoc::Markup::List: @type:BULLET:@items[ o:RDoc::Markup::ListItem:@label0;[o; ;[I"#connecting;To;;0;[o; ;[I"#disconnecting;To;;0;[o; ;[I"#starting;To;;0;[o; ;[I"#stopping;T@o; ;[I"KThe above methods are only called if auditing is enabled, via #audit=.;T@o; ;[I"NYou can also override #log and #error if, for example, you wish to use a ;TI"'more sophisticated logging system.;T: @fileI"lib/gserver.rb;T:0@omit_headings_from_table_of_contents_below0;0;0[[ I" audit;TI"RW;T:publicFI"lib/gserver.rb;T[ I" debug;TI"RW;T;F@s[ I" host;TI"R;T;F@s[ I"maxConnections;TI"R;T;F@s[ I" port;TI"R;T;F@s[ I"stdlog;TI"RW;T;F@s[U:RDoc::Constant[i I"DEFAULT_HOST;FI"GServer::DEFAULT_HOST;T00o;;[ ;@n;0@n@cRDoc::NormalClass0[ [[I" class;T[[;[[I"in_service?;F@s[I"new;T@s[I" stop;F@s[:protected[ [:private[ [I" instance;T[[;[[I"connections;F@s[I" join;F@s[I" serve;F@s[I" shutdown;F@s[I" start;F@s[I" stop;F@s[I" stopped?;F@s[;[[I"connecting;F@s[I"disconnecting;F@s[I" error;F@s[I"log;F@s[I" starting;F@s[I" stopping;F@s[;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@n@ncRDoc::TopLevel