class GRPCWeb::MessageFrame

Placeholder

Constants

HEADER_FRAME_TYPE
PAYLOAD_FRAME_TYPE

Attributes

body[RW]
frame_type[RW]

Public Class Methods

header_frame(body) click to toggle source
# File lib/grpc_web/message_frame.rb, line 12
def self.header_frame(body)
  new(HEADER_FRAME_TYPE, body)
end
new(frame_type, body) click to toggle source
# File lib/grpc_web/message_frame.rb, line 18
def initialize(frame_type, body)
  self.frame_type = frame_type
  self.body = body.b # treat body as a byte string
end
payload_frame(body) click to toggle source
# File lib/grpc_web/message_frame.rb, line 8
def self.payload_frame(body)
  new(PAYLOAD_FRAME_TYPE, body)
end

Public Instance Methods

==(other) click to toggle source
# File lib/grpc_web/message_frame.rb, line 31
def ==(other)
  frame_type == other.frame_type && body == other.body
end
header?() click to toggle source
# File lib/grpc_web/message_frame.rb, line 27
def header?
  frame_type == HEADER_FRAME_TYPE
end
payload?() click to toggle source
# File lib/grpc_web/message_frame.rb, line 23
def payload?
  frame_type == PAYLOAD_FRAME_TYPE
end