Event:...ection(3pm)

πŸ’– Event::RPC::Connection(3pm) πŸ’–

okay bestie, welcome to the User Contributed Perl Documentation section of the manual, where we're gonna talk about Event::RPC::Connection β€” the lil class that reps a RPC connection. it's giving internal-API-only realness, and honestly? iconic. πŸŽ€


✨ NAME ✨

Event::RPC::Connection β€” represents a RPC connection πŸ¦‹


🌸 SYNOPSIS 🌸

heads up bestie: you literally never create instances of this class in your own code. Event::RPC::Connection is only used internally by Event::RPC::Server. but β€” and this is the slay part β€” you may request connection objects using the connection_hook of Event::RPC::Server and then have some read access on them. casual. πŸ’…
  my $connection = Event::RPC::Server::Connection->new (
      $rpc_server, $client_socket
  );

also!! you can grab the currently active connection straight from your Event::RPC::Server object, like so:

  my $server     = Event::RPC::Server->instance;
  my $connection = $server->get_active_connection;

no cap, that's the whole vibe. 🌈


πŸ’œ DESCRIPTION πŸ’œ

objects of this class represent a connection from an Event::RPC::Client to an Event::RPC::Server instance. they live inside the server (main character energy fr fr), and the whole entire Client/Server protocol is implemented right here. the way that this one class is carrying the entire conversation?? obsessed. πŸ˜­πŸ‘‘


πŸ‘‘ READ ONLY ATTRIBUTES πŸ‘‘

the following attributes may be read using the corresponding get_ATTRIBUTE accessors. read only means read only, bestie, we do not touch. πŸ™ˆ

  • cid β€” the connection ID of this connection. it's a number which is unique for this server instance. lowkey your connection's little social security number. ⭐
  • server β€” the Event::RPC::Server instance this connection belongs to. it's giving find your people. 🫢
  • is_authenticated β€” this boolean value reflects whether the connection is authenticated resp. whether the client passed correct credentials. true or false, no in-between, vibe check passed or not. πŸ”₯
  • auth_user β€” this is the name of the user who was authenticated successfully for this connection. shoutout to them specifically. 🌸
  • client_oids β€” this is a hash reference of object id's which are in use by the client of this connection. keys are the object ids, value is always 1. you can get the corresponding objects by using the
  $connection->get_client_object($oid)

method. easy peasy. ✨

🚨 bestie listen to me right now: don't change anything in this hash β€” in particular, don't delete or add entries. Event::RPC does all the necessary garbage collection transparently, so there is literally no need to mess with that. don't do it. put it down. hands off. πŸ’€

🌟 AUTHORS 🌟

  • JΓΆrn Reder <joern AT zyn.de> πŸŽ€

Copyright (C) 2005-2015 by JΓΆrn Reder <joern AT zyn.de>.

This library 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!! this one came from perl v5.40.1 and the docs were dated 2025-09-29 β€” tysm for reading, mwah, go read your other manpages, ily πŸ’œπŸ’…βœ¨

πŸ“¦ where this page comes from