- I determined that megaphone needed to listen for new connections.
- I came to a conclusion regarding how to watch for new connections.
- I researched how to call ejabberd_http_bind
The good news is that, because very few people read this blog, I don't feel so bad about admitting it when I mess up. The bad news is that I was wrong again.
At this point, it looks like the bit of code that invokes ejabberd_http_bind, or more specifically mod_http_bind:process, is some code in ejabberd_http:
process([], _) ->
ejabberd_web:error(not_found);
process(Handlers, Request) ->
[{HandlerPathPrefix, HandlerModule} | HandlersLeft] = Handlers,
case (lists:prefix(HandlerPathPrefix, Request#request.path) or
(HandlerPathPrefix==Request#request.path)) of
true ->
<removed some comments and debug statements>
LocalPath = lists:nthtail(length(HandlerPathPrefix), Request#request.path),
R = HandlerModule:process(LocalPath, Request),
ejabberd_hooks:run(http_request_debug, [{LocalPath, Request}]),
R;
false ->
process(HandlersLeft, Request)
end.
To be more specific, I now think that this bit of code:
R = HandlerModule:process(LocalPath, Request),
Is the one that invokes the BOSH stuff. In the case where BOSH is being dealt with, the HandlerModule is "mod_http_bind" so hopefully that is what I need to invoke.
Next time: the code to invoke this stuff, hopefully.
No comments:
Post a Comment