When pushing a message to channel, is it possible to get confirmation form server?
For example:
def handle_in("new:bus_location", msg, socket) do
bus_id= msg["bus_id"]
Logger.info "new:bus_location buses:#{bus_id}"
broadcast! socket, "new:bus_location", %{bus_id: bus_id, long: msg["long"], lat: msg["lat"]}
{:noreply, socket}
end
is it possible to return {:ok, socket}
? then how would I listen for it after pushing the message?