cro-websocket-frame

Cro::WebSocket::Frame

The Cro::WebSocket::Frame class represents WebSocket frame as defined per RFC 6455. The frame is assumed to be already unmasked/masked on parser/serializer level.

It exports Opcode enum that consists of possible frame opcodes, they are:

  • Continuation(0)

  • Text(1)

  • Binary(2)

  • Close(8)

  • Ping(9)

  • Pong(0)

It can be used with full name qualification as follows

my $opcode = Cro::WebSocket::Frame::Opcode(0);

Attributes

The class has three attributes, all of them are marked as rw;

fin

fin class attribute is a Bool flag that indicates whether this message final or not.

opcode

opcode class attribute describes frame opcode.

payload

payload is a Blob that contains Payload Data part of the frame. Payload is treated as a single blob, i.e. there is no distinction between Extension data and Application data on this level.

cro v0.8.8

Libraries and tools for building reactive services in Raku. This installs the cro command line and web tool, along with HTTP (including HTTPS and HTTP/2.0) and WebSocket support.

Authors

  • Jonathan Worthington

License

Artistic-2.0

Dependencies

IO::Socket::Async::SSLJSON::FastMETA6Shell::CommandFile::FindTerminal::ANSIColorOO::MonitorsYAMLishCro::WebSocket:ver<0.8.8>Docker::FileFile::Ignore

Test Dependencies

Provides

  • Cro::Tools::CLI
  • Cro::Tools::CroFile
  • Cro::Tools::Link::Editor
  • Cro::Tools::LinkTemplate
  • Cro::Tools::LinkTemplate::HTTP
  • Cro::Tools::LinkTemplate::HTTPS
  • Cro::Tools::LinkTemplate::WS
  • Cro::Tools::LinkTemplate::WSS
  • Cro::Tools::Runner
  • Cro::Tools::Serve
  • Cro::Tools::Services
  • Cro::Tools::Template
  • Cro::Tools::Template::Common
  • Cro::Tools::Template::HTTPService
  • Cro::Tools::Template::ReactReduxSPA
  • Cro::Tools::Template::ZeroMQWorkSinkService
  • Cro::Tools::Template::ZeroMQWorkerService
  • Cro::Tools::TemplateLocator
  • Cro::Tools::Web

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.