File: constants.rb

package info (click to toggle)
ruby-ftw 0.0.49-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 548 kB
  • sloc: ruby: 1,922; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 870 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# The UUID comes from: 
# http://tools.ietf.org/html/rfc6455#page-23
#
# The opcode definitions come from:
# http://tools.ietf.org/html/rfc6455#section-11.8
module FTW::WebSocket::Constants
  # websocket uuid, used in hash signing of websocket responses (RFC6455)
  WEBSOCKET_ACCEPT_UUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"

  # Indication that this frame is a continuation in a fragmented message
  # See RFC6455 page 33.
  OPCODE_CONTINUATION = 0

  # Indication that this frame contains a text message
  OPCODE_TEXT = 1

  # Indication that this frame contains a binary message
  OPCODE_BINARY = 2

  # Indication that this frame is a 'connection close' message
  OPCODE_CLOSE = 8

  # Indication that this frame is a 'ping' message
  OPCODE_PING = 9

  # Indication that this frame is a 'pong' message
  OPCODE_PONG = 10
end # module FTW::WebSocket::Constants