NET :: Stomp :: Klant

Stomp Object Oriented Client-module
Download nu

NET :: Stomp :: Klant Rangschikking & Samenvatting

Advertentie

  • Rating:
  • Vergunning:
  • Perl Artistic License
  • Naam uitgever:
  • Lionel Cons
  • Uitgever website:
  • http://search.cpan.org/~lcons/

NET :: Stomp :: Klant Tags


NET :: Stomp :: Klant Beschrijving

Stomp Object Oriented Client-module NET :: Stomp :: Client is een PERL-module die een objectgeoriënteerde client-interface biedt om te communiceren met servers die Stomp ondersteunen (Streaming Tekstgericht Messaging Protocol). Het ondersteunt de belangrijkste kenmerken van moderne berichtenmakelaars: SSL, asynchrone I / O, ontvangsten en transacties.synopsis # # eenvoudige producent # gebruik netto :: stomp :: client; $ stomp = net :: stomp :: client-> nieuw (host => "127.0.0.1", poort => 61613); $ stomp-> verbinding (login => "gast", toegangscode => "gast"); $ stomp-> verzenden (bestemming => "/ wachtrij / test", lichaam => "Hallo World!"); $ stomp-> loskoppelen (); # # Consument met client aan de kant bevestigen # Gebruik net :: stomp :: client; $ stomp = net :: stomp :: client-> nieuw (host => "127.0.0.1", poort => 61613); $ stomp-> verbinding (login => "gast", toegangscode => "gast"); # Verkeer een callback om te worden opgeroepen voor elk ontvangen bericht frame $ stomp-> bericht_callback (sub {mijn ($ self, $ frame) = @_; $ self-> ack (frame => $ frame); printf ("ontvangen: % s \ n ", $ frame-> lichaam ()); terugkeer ($ zelf);}); # Abonneren op de opgegeven wachtrij $ stomp-> abonneren (bestemming => "/ wachtrij / test", ACK => "client"); # Wacht op een opgegeven berichtframe $ stomp-> bediening_for_frames (callback => sub {mijn ($ zelf, $ frame) = @_; if ($ frame-> opdracht () EQ "bericht") {# Stop met wachten op Nieuw Frames Als het lichaam is "Quit" -rendement (1) als $ Frame-> Body () EQ "QUIT";} # blijven wachten op meer frames Return (0);}); $ stomp-> afmelden (bestemming => "/ wachtrij / test"); $ stomp-> loskoppelen (); Vereisten: · Perl


NET :: Stomp :: Klant Gerelateerde software

Fbp

PARDER EN OBJECT MODEL VOOR WXFORMBUILDER Projectbestanden (.fpb-bestanden) ...

222

Downloaden