25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

[TECH-1511] preliminary XMPP support via websockets

This commit is contained in:
Eric Cestari 2010-09-13 17:26:24 +02:00
parent c8567f1de2
commit 18b569a356
4 changed files with 11 additions and 2 deletions

View File

@ -75,7 +75,7 @@ update_reg_users_counter_table(Server) ->
mnesia:sync_dirty(F).
plain_password_required() ->
false.
true.
check_password(User, Server, Password) ->
LUser = jlib:nodeprep(User),

View File

@ -1851,6 +1851,7 @@ get_conn_type(StateData) ->
end
end;
ejabberd_http_poll -> http_poll;
ejabberd_http_ws -> http_ws;
ejabberd_http_bind -> http_bind;
_ -> unknown
end.

View File

@ -146,6 +146,14 @@ init([]) ->
infinity,
supervisor,
[ejabberd_tmp_sup]},
WSLoopSupervisor =
{ejabberd_wsloop_sup,
{ejabberd_tmp_sup, start_link,
[ejabberd_wsloop_sup, ejabberd_wsloop]},
permanent,
infinity,
supervisor,
[ejabberd_tmp_sup]},
FrontendSocketSupervisor =
{ejabberd_frontend_socket_sup,
{ejabberd_tmp_sup, start_link,

View File

@ -60,7 +60,7 @@ connect(#ws{vsn = Vsn, socket = Socket, origin=Origin, host=Host, port=Port, soc
Ws0 = ejabberd_ws:new(Ws#ws{origin = Origin, host = Host}, self()),
?DEBUG("Ws0 : ~p",[Ws0]),
% add data to ws record and spawn controlling process
WsHandleLoopPid = WsLoop:start(Ws0),
{ok, WsHandleLoopPid} = WsLoop:start_link(Ws0),
erlang:monitor(process, WsHandleLoopPid),
% set opts
case SockMod of