summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.2/sig/httpserver.rbs
diff options
context:
space:
mode:
authorBen Sanders <ben@sanders.life>2026-08-02 09:49:25 -0400
committerBen Sanders <ben@sanders.life>2026-08-02 09:49:25 -0400
commitb41479c91e6685511c1f8ba8586106b322073b62 (patch)
treec9f1345999d754ae0a533849966427e792d9e68d /vendor/bundle/ruby/3.4.0/gems/webrick-1.9.2/sig/httpserver.rbs
parentcfaceeb9a6d1295f5754be211858155cd309acc2 (diff)
added statscounter code
Diffstat (limited to 'vendor/bundle/ruby/3.4.0/gems/webrick-1.9.2/sig/httpserver.rbs')
-rw-r--r--vendor/bundle/ruby/3.4.0/gems/webrick-1.9.2/sig/httpserver.rbs71
1 files changed, 71 insertions, 0 deletions
diff --git a/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.2/sig/httpserver.rbs b/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.2/sig/httpserver.rbs
new file mode 100644
index 0000000..6c966e9
--- /dev/null
+++ b/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.2/sig/httpserver.rbs
@@ -0,0 +1,71 @@
+module WEBrick
+ class HTTPServerError < ServerError
+ end
+
+ class HTTPServer < ::WEBrick::GenericServer
+ @http_version: HTTPVersion
+
+ @mount_tab: MountTable
+
+ @virtual_hosts: Array[untyped]
+
+ def initialize: (?Hash[Symbol, untyped] config, ?Hash[Symbol, untyped] default) -> void
+
+ def run: (TCPSocket sock) -> void
+
+ def service: (HTTPRequest req, HTTPResponse res) -> void
+
+ def do_OPTIONS: (HTTPRequest req, HTTPResponse res) -> void
+
+ def mount: (String dir, singleton(HTTPServlet::AbstractServlet) servlet, *untyped options) -> void
+
+ def mount_proc: (String dir, ?HTTPServlet::ProcHandler::_Callable proc) -> void
+ | (String dir, ?nil proc) { (HTTPRequest, HTTPResponse) -> void } -> void
+
+ def unmount: (String dir) -> MountTable::value_type
+
+ alias umount unmount
+
+ def search_servlet: (String path) -> [singleton(HTTPServlet::AbstractServlet), Array[untyped], String, String]?
+
+ def virtual_host: (instance server) -> void
+
+ def lookup_server: (HTTPRequest req) -> instance?
+
+ def access_log: (Hash[Symbol, untyped] config, HTTPRequest req, HTTPResponse res) -> void
+
+ #
+ # Creates the HTTPRequest used when handling the HTTP
+ # request. Can be overridden by subclasses.
+ def create_request: (Hash[Symbol, untyped] with_webrick_config) -> HTTPRequest
+
+ #
+ # Creates the HTTPResponse used when handling the HTTP
+ # request. Can be overridden by subclasses.
+ def create_response: (Hash[Symbol, untyped] with_webrick_config) -> HTTPResponse
+
+ class MountTable
+ type value_type = [singleton(HTTPServlet::AbstractServlet), Array[untyped]]
+
+ @tab: Hash[String, value_type]
+
+ @scanner: Regexp
+
+ def initialize: () -> void
+
+ def []: (String dir) -> value_type
+
+ def []=: (String dir, value_type val) -> value_type
+
+ def delete: (String dir) -> value_type
+
+ def scan: (String path) -> [String, String]
+
+ private
+
+ def compile: () -> void
+
+ def normalize: (String dir) -> String
+ end
+ end
+end