class GeminiServer::Connection

Defined in:

gemini_server/connection.cr

Constant Summary

BUF_SIZE = 32768

Class Method Summary

Class Method Detail

def self.handle_connection(tcp_socket : TCPSocket, ssl_context : OpenSSL::SSL::Context, config : GeminiServer::Config, uri_handlers : Array(UriHandler)) #

[View source]
def self.handle_request(server_port, server_address, request : String | Nil, config, uri_handlers : Array(UriHandler)) : GeminiServer::Reply::Base #

[View source]
def self.log_request(client_address : Socket::IPAddress, request : String | Nil, reply : GeminiServer::Reply::Base, request_start : Time, document_size) #

[View source]
def self.my_copy(src, dst) : Int64 #

A copy of IO.copy, but with Fiber.yield added


[View source]
def self.validate_request(request : String | Nil, server_port) : URI #

[View source]