Class: Protocol::WebSocket::Framer

Inherits:
Object
  • Object
show all
Defined in:
lib/protocol/websocket/framer.rb

Instance Method Summary collapse

Constructor Details

#initialize(stream) ⇒ Framer

Returns a new instance of Framer.



26
27
28
# File 'lib/protocol/websocket/framer.rb', line 26

def initialize(stream)
	@stream = stream
end

Instance Method Details

#closeObject



30
31
32
# File 'lib/protocol/websocket/framer.rb', line 30

def close
	@stream.close
end

#flushObject



34
35
36
# File 'lib/protocol/websocket/framer.rb', line 34

def flush
	@stream.flush
end

#read_frameObject



38
39
40
# File 'lib/protocol/websocket/framer.rb', line 38

def read_frame
	Frame.read(@stream)
end

#read_messageObject



42
43
44
# File 'lib/protocol/websocket/framer.rb', line 42

def read_message
	
end

#write_frame(frame) ⇒ Object



49
50
51
# File 'lib/protocol/websocket/framer.rb', line 49

def write_frame(frame)
	frame.write(@stream)
end

#write_message(opcode, payload) ⇒ Object



46
47
# File 'lib/protocol/websocket/framer.rb', line 46

def write_message(opcode, payload)
end