IKC::Channel(3)
π IKC::Channel(3) β User Contributed Perl Documentation π
okay bestie, this is the IKC::Channel(3) page from the User Contributed Perl Documentation, and it's all about the POE Inter-Kernel Communication I/O session. Buckle up, it's giving plumbing-but-make-it-cute. π«Ά
β¨ NAME β¨
POE::Component::IKC::Channel β POE Inter-Kernel Communication I/O session.
π SYNOPSIS π
use POE;
use POE::Component::IKC::Channel;
POE::Component::IKC::Channel->spawn( %params );
π¦ DESCRIPTION π¦
Okay so real talk: you will never use an IKC Channel directly. They are created by POE::Component::IKC::Server and POE::Component::IKC::Client as needed. No cap.
This module implements a POE IKC I/O. When a new connection is established, IKC::Server and IKC::Client create an IKC::Channel to handle the I/O. Main character energy: the channel handles the talking. π
IKC communication happens in 2 phases: the negociation phase and the normal phase.
The negociation phase uses Filter::Line and is used to exchange various parameters between kernels (example: kernel names, what type of freeze/thaw to use, etc). After negociation, IKC::Channel switches to a Filter::Reference and creates a IKC::Responder, if needed. After this, the channel forwards reads and writes between Wheel::ReadWrite and the Responder.
IKC::Channel is also in charge of cleaning up kernel names when the foreign kernel disconnects. So it's not just a vibe; it's also the cleanup crew. π§Ή
πΈ METHODS πΈ
β¨ spawn β¨
POE::Component::IKC::Channel->spawn(%param);
Creates a new IKC channel to handle the negociations then the actual data.
Parameters are keyed as follows:
handleβ The perl handle we should hand toWheel::ReadWrite::new.kernel_nameβ The name of the local kernel. This is a stop-gap until event naming has been resolved.on_connectβ Code ref that is called when the negociation phase has terminated. Normally, you would use this to start the sessions that post events to foreign kernels.subscribeβ Array ref of specifiers (either foreign sessions, or foreign states) that you want to subscribe to.$on_connectwill only be called if you can subscribe to all those specifiers. If it can't, it willdie().unixβ A flag indicating that the handle is a Unix domain socket or not.aliasesβ Arrayref of aliases for the local kernel.serializersβ Arrayref or scalar of the packages that you want to use for data serialization. A serializer package requires 2 functions:freeze(ornfreeze) andthaw. SeePOE::Component::IKC::Client."protocol"β Which IKC negociation protocol to use. The original protocol ("IKC") was synchronous and slow. The new protocol ("IKC0") sends all information at once. IKC0 will degrade gracefully to IKC, if the client and server don't match. Default currently IKC but will move to IKC0 when I'm confident in the new protocol.
π₯ EVENTS π₯
π shutdown π
This event causes the server to close it's socket and skiddadle on down the road. Normally it is only posted from IKC::Responder.
If you want to post this event yourself, you can get the channel's session ID from IKC::Client's on_connect:
POE::Component::IKC::Client->spawn(
....
on_connect=>sub {
$heap->{channel} = $poe_kernel->get_active_session()->ID;
},
....
);
Then, when it becomes time to disconnect:
$poe_kernel->call($heap->{channel} => 'shutdown');
Yes, this is a hack. A cleaner machanism needs to be provided.
π EXPORTED FUNCTIONS π
π create_ikc_channel π
Deprecated. That's the whole note β iconic minimalism. π
π BUGS π
This section is empty in the original page β nothing listed here. Not me making it up, bestie; it's literally blank. π
π AUTHOR π
Philip Gwyn, <perl-ikc at pied.nu>
π COPYRIGHT AND LICENSE π
Copyright 1999-2014 by Philip Gwyn. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/language/misc/Artistic.html>
π SEE ALSO π
POEPOE::Component::IKC::ServerPOE::Component::IKC::ClientPOE::Component::IKC::Responder
xoxo, bestie π this was the IKC::Channel(3) page, built with perl v5.42.0 and dated 2025-12-14. Slay and read the docs responsibly. π«Άβ¨
π¦ where this page comes from
- arch rolling: perl-poe-component-ikc 0.2402-13 Β· GPL AND PerlArtistic
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms