lib/oversip/launcher.rb in oversip-1.1.0.beta5 vs lib/oversip/launcher.rb in oversip-1.1.0
- old
+ new
@@ -104,12 +104,13 @@
require "oversip/master_process.rb"
::OverSIP::TLS.module_init
::OverSIP::SIP.module_init
::OverSIP::SIP::RFC3263.module_init
+ ::OverSIP::WebSocket.module_init
::OverSIP::WebSocket::WsFraming.class_init
- ::OverSIP::WebSocket::WsApp.class_init
+ ::OverSIP::WebSocket::WsSipApp.class_init
# I'm the syslogger process.
else
# Close the pipe in the syslogger process.
ready_pipe.close rescue nil
@@ -209,48 +210,42 @@
if configuration[:websocket][:sip_ws]
# WebSocket IPv4 TCP SIP server.
if configuration[:websocket][:enable_ipv4]
::OverSIP::WebSocket::Launcher.run true, :ipv4, configuration[:websocket][:listen_ipv4],
- configuration[:websocket][:listen_port], :tcp,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL
+ configuration[:websocket][:listen_port], :ws
end
# WebSocket IPv6 TCP SIP server.
if configuration[:websocket][:enable_ipv6]
::OverSIP::WebSocket::Launcher.run true, :ipv6, configuration[:websocket][:listen_ipv6],
- configuration[:websocket][:listen_port], :tcp,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL
+ configuration[:websocket][:listen_port], :ws
end
end
if configuration[:websocket][:sip_wss]
unless configuration[:websocket][:use_tls_tunnel]
# WebSocket IPv4 TLS SIP server (native).
if configuration[:websocket][:enable_ipv4]
::OverSIP::WebSocket::Launcher.run true, :ipv4, configuration[:websocket][:listen_ipv4],
- configuration[:websocket][:listen_port_tls], :tls,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL
+ configuration[:websocket][:listen_port_tls], :wss
end
# WebSocket IPv6 TLS SIP server (native).
if configuration[:websocket][:enable_ipv6]
::OverSIP::WebSocket::Launcher.run true, :ipv6, configuration[:websocket][:listen_ipv6],
- configuration[:websocket][:listen_port_tls], :tls,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL
+ configuration[:websocket][:listen_port_tls], :wss
end
else
# WebSocket IPv4 TLS SIP server (Stud).
if configuration[:websocket][:enable_ipv4]
::OverSIP::WebSocket::Launcher.run true, :ipv4, "127.0.0.1",
- configuration[:websocket][:listen_port_tls_tunnel], :tls_tunnel,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL,
+ configuration[:websocket][:listen_port_tls_tunnel], :wss_tunnel,
configuration[:websocket][:listen_ipv4],
configuration[:websocket][:listen_port_tls]
::OverSIP::WebSocket::Launcher.run false, :ipv4, configuration[:websocket][:listen_ipv4],
- configuration[:websocket][:listen_port_tls], :tls,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL
+ configuration[:websocket][:listen_port_tls], :wss
# Spawn a Stud process.
spawn_stud_process options,
configuration[:websocket][:listen_ipv4], configuration[:websocket][:listen_port_tls],
"127.0.0.1", configuration[:websocket][:listen_port_tls_tunnel],
@@ -258,43 +253,23 @@
end
# WebSocket IPv6 TLS SIP server (Stud).
if configuration[:sip][:enable_ipv6]
::OverSIP::WebSocket::Launcher.run true, :ipv6, "::1",
- configuration[:websocket][:listen_port_tls_tunnel], :tls_tunnel,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL,
+ configuration[:websocket][:listen_port_tls_tunnel], :wss_tunnel,
configuration[:websocket][:listen_ipv6],
configuration[:websocket][:listen_port_tls]
::OverSIP::WebSocket::Launcher.run false, :ipv6, configuration[:websocket][:listen_ipv6],
- configuration[:websocket][:listen_port_tls], :tls,
- ::OverSIP::WebSocket::WS_SIP_PROTOCOL
+ configuration[:websocket][:listen_port_tls], :wss
# Spawn a Stud process.
spawn_stud_process options,
configuration[:websocket][:listen_ipv6], configuration[:websocket][:listen_port_tls],
"::1", configuration[:websocket][:listen_port_tls_tunnel],
ssl = true
end
end
end
-
-
- # TEST: WebSocket Autobahn server.
- #if configuration[:websocket][:sip_ws]
- # if configuration[:websocket][:enable_ipv4]
- # ::OverSIP::WebSocket::Launcher.run true, :ipv4, configuration[:websocket][:listen_ipv4],
- # 9001, :tcp,
- # ::OverSIP::WebSocket::WS_AUTOBAHN_PROTOCOL
- # end
- #end
- #
- #if configuration[:websocket][:sip_wss]
- # if configuration[:websocket][:enable_ipv4]
- # ::OverSIP::WebSocket::Launcher.run true, :ipv4, configuration[:websocket][:listen_ipv4],
- # 9002, :tls,
- # ::OverSIP::WebSocket::WS_AUTOBAHN_PROTOCOL
- # end
- #end
# Change process permissions if requested.
set_user_group(options[:user], options[:group])