Class: Rex::Proto::Http::WebSocket::Opcode

Inherits:
BinData::Bit4
  • Object
show all
Defined in:
lib/rex/proto/http/web_socket.rb

Constant Summary collapse

CONTINUATION =
0
TEXT =
1
BINARY =
2
CONNECTION_CLOSE =
8
PING =
9
PONG =
10

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.name(value) ⇒ Object



326
327
328
# File 'lib/rex/proto/http/web_socket.rb', line 326

def self.name(value)
  constants.select { |c| c.upcase == c }.find { |c| const_get(c) == value }
end

Instance Method Details

#to_symObject



330
331
332
# File 'lib/rex/proto/http/web_socket.rb', line 330

def to_sym
  self.class.name(value)
end