Skip to content

Commit

Permalink
Improved documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Feb 21, 2025
1 parent ba404c6 commit a6b9bd9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/falcon/environment/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,23 @@ def cache
false
end

# A client endpoint that can be used to connect to the server.
# @returns [Async::HTTP::Endpoint] The client endpoint.
def client_endpoint
::Async::HTTP::Endpoint.parse(url)
end

# Any scripts to preload before starting the server.
#
# @returns [Array(String)] The list of scripts to preload.
def preload
[]
end

# Make a server instance using the given endpoint. The endpoint may be a bound endpoint, so we take care to specify the protocol and scheme as per the original endpoint.
#
# @parameter endpoint [IO::Endpoint] The endpoint to bind to.
# @returns [Falcon::Server] The server instance.
def make_server(endpoint)
Falcon::Server.new(self.middleware, endpoint, protocol: self.endpoint.protocol, scheme: self.endpoint.scheme)
end
Expand Down

0 comments on commit a6b9bd9

Please sign in to comment.