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



328
329
330
# File 'lib/rex/proto/http/web_socket.rb', line 328

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

Instance Method Details

#to_symObject



332
333
334
# File 'lib/rex/proto/http/web_socket.rb', line 332

def to_sym
  self.class.name(value)
end