Net::E...otocol(3pm)
π Net::EPP::Protocol(3pm) β the NAME section, bestie π
okay so welcome to Net::EPP::Protocol, which is a Perl module (yes it lives in the User Contributed Perl Documentation, and yes the header up top calls it Net::E...otocol(3pm) because apparently even manpage headers get truncated for the aesthetic π). It's low-level functions useful for both EPP clients and servers. That's it. That's the whole vibe. β¨
πΈ SYNOPSIS πΈ
here's the whole thing in action, no notes:
#!/usr/bin/perl
use Net::EPP::Protocol;
use strict;
# send a frame down a socket:
Net::EPP::Protocol->send_frame($socket, $xml);
# get a frame from a socket:
my $xml = Net::EPP::Protocol->get_frame($socket);
literally that's it. slay. π
π¦ DESCRIPTION π¦
so this module implements functions that are common to both EPP clients and servers that implement the TCP/TLS transport of the Extensible Provisioning Protocol (EPP) <https://www.rfc-editor.org/info/std69>, as defined in RFC 5734 <https://www.rfc-editor.org/rfc/rfc5734.html>.
the only user of this module is Net::EPP::Client β not me being shady, that's just canon π«Ά β but it may be useful if you want to write an EPP server. main character energy for a helper module, honestly. π
π VARIABLES π
$Net::EPP::Protocol::THRESHOLD
okay so story time: at least one EPP server implementation sends an unframed plain text error message when a client connects from an unauthorised address. and because of that, when the first four bytes of the message get unpacked, the client tries to read and allocate a very large amount of memory ππ
so here's the safety rail: if the apparent frame length received from a server exceeds the value of $Net::EPP::Protocol::THRESHOLD, the get_frame() method will croak.
the default value is 1GB. one. whole. gigabyte. periodt.
β¨ METHODS β¨
my $xml = Net::EPP::Protocol->get_frame($socket);
this method reads a frame from the socket and returns a scalar containing the XML. $socket must be an IO::Handle or one of its subclasses (ie "IO::Socket::*").
β οΈ if the transmission fails for whatever reason, this method willcroak(), so be sure to enclose it in aneval(). no cap, wrap it up or get wrecked. π
Net::EPP::Protocol->send_frame($socket, $xml);
this method prepares an RFC 5734 compliant EPP frame and transmits it to the remote peer. $socket must be an IO::Handle or one of its subclasses (ie "IO::Socket::*").
β οΈ same deal bestie β if the transmission fails for whatever reason, this method willcroak(), so be sure to enclose it in aneval(). otherwise, it will return a true value. π«Ά
my $frame = Net::EPP::Protocol->prep_frame($xml);
this method returns the XML frame in "wire format" with the protocol header prepended to it. the return value can be printed directly to an open socket, for example:
print STDOUT Net::EPP::Protocol->prep_frame($frame->toString);
iconic. no further questions. π₯
π COPYRIGHT π
this module is (c) 2008 - 2023 CentralNic Ltd and 2024 Gavin Brown. this module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie!! π written for perl v5.40.1, dated 2025-04-19, and the footer says Net::E...otocol(3pm) because we're keeping it cute and truncated to the very end π mwah, go write an EPP server or something π§β
π¦ where this page comes from
- debian trixie: libnet-epp-perl 0.28-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-epp-perl 0.28-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-epp-perl 0.28-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms