POE::C...::Ident(3pm)

πŸ“¦
version 1.16 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– POE::C...::Ident πŸ’–

okay bestie so this is the page for POE::C...::Ident(3pm) from the User Contributed Perl Documentation, and we're gonna get you fluent in it, no cap 🫢


✨ NAME ✨

POE::Component::Client::Ident β€” a component that gives your sessions non-blocking ident lookups. literally that's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

use POE::Component::Client::Ident;

my $poco_obj = POE::Component::Client::Ident->spawn ( 'Ident-Client' );

$kernel->post ( 'Ident-Client' => query => Socket => $socket );

$kernel->post ( 'Ident-Client' => query => PeerAddr => '10.0.0.1',
                                           PeerPort => 2345,
                                           SockAddr => '192.168.1.254',
                                           SockPort => 6669,
                                           BuggyIdentd => 1,
                                           TimeOut => 30 );

look at that second form go 😭 she's thorough. she's got receipts. she's got BuggyIdentd.


πŸ¦‹ DESCRIPTION πŸ¦‹

POE::Component::Client::Ident is a POE component, and what she does is provide non-blocking Ident lookup services to all the other components and sessions out here. the Ident protocol itself is described in RFC 1413 <http://www.faqs.org/rfcs/rfc1413.html> β€” go read it, iykyk πŸ“–

the way this works: the component takes requests in the form of events, then spawns POE::Component::Client::Ident::Agent sessions to go do the actual Ident queries, and then hands the appropriate responses back to whichever session asked. middle management, but make it ✨helpful✨


πŸŽ€ CONSTRUCTOR πŸŽ€

spawn

takes exactly one argument, bestie: a kernel alias, which is the name you're christening this new component with 🍼

returns an object. that's it, that's the deal.


πŸ’… METHODS πŸ’…

these methods live on the poco object that spawn() hands you back.

  • session_id β€” returns the component's session ID. that's the whole vibe. πŸͺͺ
  • shutdown β€” takes no arguments. causes the component to terminate gracefully. any pending Ident::Agent components that are still running will be closed without returning events β€” so don't be waiting on them, they're gone, they left the group chat πŸ‘‹

🌈 INPUT 🌈

the component accepts these events:

query

takes either this set of arguments:

  • PeerAddr β€” the remote IP address where a TCP connection has originated
  • PeerPort β€” the port where the TCP has originated from
  • SockAddr β€” the address of our end of the connection
  • SockPort β€” the port of our end of the connection

OR:

  • Socket β€” the socket handle of the connection, and the component will work out all the details for you. and listen: if Socket is defined, it overrides the settings of the other arguments. she said "i got it from here" and she meant it πŸ’β€β™€οΈ

also go check the documentation for Ident-Agent for extra parameters you may pass. more options, more slay.

shutdown

takes no arguments. causes the component to terminate gracefully. any pending Ident::Agent components that are running will be closed without returning events. same energy as the method above, fr fr.


πŸ”₯ OUTPUT πŸ”₯

these are the events you can expect to receive once you've submitted a query.

all the events returned by the component have a hashref as ARG0. that hashref contains the arguments that were passed to the component. and if a socket handle was passed, the hashref will contain the appropriate PeerAddr, PeerPort, SockAddr and Sock Port. 🧺

ident_client_reply

returned when the component receives a USERID response from the identd. ARG0 is hashref, ARG1 is the opsys field, and ARG2 is the userid β€” or something else entirely, depending on whether the opsys field is set to 'OTHER'. ( don't blame me, read the RFC 😭 )

ident_client_error

returned when the component receives an ERROR response from the identd, or there was some sort of communication error with the remote host ( ie. no identd running ), or it had some other problem with making the connection to the other host. no matter. ARG0 is hashref, ARG1 is the type of error. we move πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Chris Williams, <chris@bingosnet.co.uk<gt>


πŸ“œ LICENSE πŸ“œ

Copyright Β© Chris Williams.

This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details. read your license bestie, it's giving responsible queen 🫢


πŸ’œ SEE ALSO πŸ’œ


and that's the whole page, babes πŸ’– this one shipped as part of perl v5.36.0, dated 2022-12-04, and yes the footer still calls it POE::C...::Ident(3pm) because she's got a long name and the terminal has a short attention span. periodt. πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from