Sha256: f81a82fcdc4f5305f633561afff0bcfcb26ee5bb4f735c3dbb43e57e2629aa56
Contents?: true
Size: 890 Bytes
Versions: 5
Compression:
Stored size: 890 Bytes
Contents
# code: # * George Moschovitis <gm@navel.gr> # # (c) 2004 Navel, all rights reserved. # $Id: server.rb 155 2004-11-13 20:32:12Z gmosx $ require "nitro/application" module N # = Server # # Base server class, provides generic server # infrastructure. # class Server < N::Application # the listening address/port for this server. attr_reader :address, :port def initialize(name = "Server") super end # Start the server # def start super end # Stop the server # def stop super end # The main server loop # def run begin while :RUNNING == @status if live = IO.select(@ios, nil, nil, 2.0) end end rescue end end # Override this method in your custom server. This method is very # flexible, you can spawn threads, use keep alive connections, # handle+close, use handler pools, anything. # def handle end end end # module
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.4.1 | lib/nitro/server.rb |
nitro-0.6.0 | lib/nitro/server.rb |
nitro-0.8.0 | lib/nitro/server.rb |
nitro-0.5.0 | lib/nitro/server.rb |
nitro-0.7.0 | lib/nitro/server.rb |