Class: HttpState::Message
- Inherits:
-
Object
- Object
- HttpState::Message
- Defined in:
- lib/httpstate.rb
Defined Under Namespace
Classes: MessageType
Class Method Summary collapse
Class Method Details
.unpack(b) ⇒ Object
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/httpstate.rb', line 45 def self.unpack(b) length = b.getbyte(0) MessageType.new( b.byteslice(1, length).force_encoding("UTF-8"), b.byteslice(1+length, 8).unpack1("Q>"), b.getbyte(1+length+8), b.byteslice(1+length+9, b.bytesize-(1+length+9)) ) end |