Module: Wine::Message

Defined in:
lib/wine/message.rb

Defined Under Namespace

Classes: Get, Login, LoginAccepted, LoginRejected, Set, Value

Constant Summary collapse

LOGIN =
'L'
LOGIN_ACCEPTED =
'A'
LOGIN_REJECTED =
'J'
GET =
'G'
VALUE =
'V'
SET =
'S'

Class Method Summary collapse

Class Method Details

.read(io) ⇒ Object



50
51
52
53
54
55
56
57
# File 'lib/wine/message.rb', line 50

def self.read(io)
  begin
    type = Types[io.read(1)]
    type.read(io)
  rescue StandardError
    raise ProtocolError
  end
end