functional programming - How to send a packet from Server to Client (from a function) Ejabbered -


i looking function. global function might me work of sending stream packet client.

in function (server, from, attrs)-> construct xml element packettobesent = "packet + attrs" , on....,

i need function send froms server client directly in server. like

ejabberd:somefunction(server, from,packettobesent).

i have used ejabbered_router:route(server, from,packettobesent) deals presences , many things dont want , need.

providing have recipient logged in, can use:

ejabberd_c2s:handle_info({send_text, text}, statename, statedata) ->

or send_element(statedata, el). valid if have recipients pid or socket.

ejabberd_router:route, may better because deals offline users.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -