Module: OverSIP::WebSocket

Defined in:
lib/oversip.rb,
lib/oversip/websocket/launcher.rb,
lib/oversip/websocket/constants.rb,
lib/oversip/websocket/websocket.rb,
lib/oversip/websocket/ws_framing.rb,
lib/oversip/websocket/ws_sip_app.rb,
lib/oversip/websocket/http_request.rb,
lib/oversip/websocket/listeners/ws_server.rb,
lib/oversip/websocket/listeners/connection.rb,
lib/oversip/websocket/listeners/wss_server.rb,
lib/oversip/websocket/listeners/ipv4_ws_server.rb,
lib/oversip/websocket/listeners/ipv6_ws_server.rb,
lib/oversip/websocket/listeners/ipv4_wss_server.rb,
lib/oversip/websocket/listeners/ipv6_wss_server.rb,
lib/oversip/websocket/listeners/wss_tunnel_server.rb,
lib/oversip/websocket/listeners/ipv4_wss_tunnel_server.rb,
lib/oversip/websocket/listeners/ipv6_wss_tunnel_server.rb,
ext/websocket_http_parser/ws_http_parser_ruby.c,
ext/websocket_framing_utils/ws_framing_utils_ruby.c

Defined Under Namespace

Modules: FramingUtils, Launcher Classes: Connection, HttpRequest, HttpRequestParser, HttpRequestParserError, IPv4WsServer, IPv4WssServer, IPv4WssTunnelServer, IPv6WsServer, IPv6WssServer, IPv6WssTunnelServer, WsFraming, WsServer, WsSipApp, WssServer, WssTunnelServer

Constant Summary collapse

CRLF =
"\r\n"
REASON_PHRASE =
{
  100 => "Continue",
  101 => "Switching Protocols",
  200 => "OK",
  201 => "Created",
  202 => "Accepted",
  203 => "Non-Authoritative Information",
  204 => "No Content",
  205 => "Reset Content",
  206 => "Partial Content",
  300 => "Multiple Choices",
  301 => "Moved Permanently",
  302 => "Found",
  303 => "See Other",
  304 => "Not Modified",
  305 => "Use Proxy",
  307 => "Temporary Redirect",
  400 => "Bad Request",
  401 => "Unauthorized",
  402 => "Payment Required",
  403 => "Forbidden",
  404 => "Not Found",
  405 => "Method Not Allowed",
  406 => "Not Acceptable",
  407 => "Proxy Authentication Required",
  408 => "Request Timeout",
  409 => "Conflict",
  410 => "Gone",
  411 => "Length Required",
  412 => "Precondition Failed",
  413 => "Request Entity Too Large",
  414 => "Request-URI Too Long",
  415 => "Unsupported Media Type",
  416 => "Requested Range Not Satisfiable",
  417 => "Expectation Failed",
  426 => "Upgrade Required",  # RFC 2817
  500 => "Server Internal Error",
  501 => "Not Implemented",
  502 => "Bad Gateway",
  503 => "Service Unavailable",
  504 => "Gateway Time-out",
  505 => "HTTP Version Not Supported"
}
REASON_PHRASE_NOT_SET =
"Reason Phrase Not Set"
HDR_SERVER =
"Server: #{::OverSIP::PROGRAM_NAME}/#{::OverSIP::VERSION}".freeze
WS_SIP_PROTOCOL =
"sip"

Class Method Summary collapse

Class Method Details

.callback_on_client_tls_handshakeObject



9
10
11
# File 'lib/oversip/websocket/websocket.rb', line 9

def self.callback_on_client_tls_handshake
  @callback_on_client_tls_handshake
end

.module_initObject



3
4
5
6
7
# File 'lib/oversip/websocket/websocket.rb', line 3

def self.module_init
  conf = ::OverSIP.configuration

  @callback_on_client_tls_handshake = conf[:websocket][:callback_on_client_tls_handshake]
end