class Strum::Server::Packet::Payload
Public Class Methods
new(data)
click to toggle source
# File lib/strum/server/packet/payload.rb, line 14 def initialize(data) self[:Buffer] = data ? data : Async::IO::Buffer.new end
Public Instance Methods
build()
click to toggle source
Returns the current body of this packet.
# File lib/strum/server/packet/payload.rb, line 20 def build self[:Buffer] end
write(data)
click to toggle source
Writes data to this Packet's body
# File lib/strum/server/packet/payload.rb, line 26 def write(data) self[:Buffer] << [data].pack('C*') end
Also aliased as: <<