GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GraphQL::PubSub(3) User Contributed Perl Documentation GraphQL::PubSub(3)

GraphQL::PubSub - publish/subscribe

  use GraphQL::PubSub;
  my $pubsub = GraphQL::PubSub->new;
  $pubsub->subscribe('channel1', \&callback);
  $pubsub->publish('channel1', 1);
  $pubsub->unsubscribe('channel1', \&callback);

Encapsulates the publish/subscribe logic needed by GraphQL::Subscription.

Registers the given callback on the given channel.

The optional second "error" callback is called as a method on the object when an exception is thrown by the first callback. If not given, the default is for the subscription to be cancelled with "unsubscribe". The error callback will be called with values of the channel, the original callback (to enable unsubscribing), the exception thrown, then the values passed to the original callback. Any exceptions will be ignored.

Removes the given callback from the given channel.

Calls each callback registered on the given channel, with the given values.
2021-07-04 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.