Net::Gemini::Server − test gemini server
use
Net::Gemini::Server;
my $server = Net::Gemini::Server−>new(
listen => {
LocalAddr => '127.0.0.1',
LocalPort => 0,
},
context => {
SSL_cert_file => ...,
SSL_key_file => ...,
}
);
$server−>withforks(
sub {
my ( $client, $size, $request) = @_;
...
close $client;
}
);
This module provides a simple test server for Net::Gemini; see the test code for that module.
new param
Constructor. The param should include listen and context key values to configure the listen object and SSL context object.
context =item port =item socket
Accessors; return the context object (see IO::Socket::SSL), listen port, and socket of the server.
withforks callback
Accepts connections and forks child processes to handle the client request with the given callback. The callback is passed the client socket, size of the request, and the request string.
None known. But it is a rather incomplete module; that may be considered a bug?
<gemini://gemini.circumlunar.space/docs/specification.gmi> (v0.16.1)
RFC 3986
Copyright 2022 Jeremy Mates
This program is distributed under the (Revised) BSD License: <https://opensource.org/licenses/BSD−3−Clause>