Created
October 5, 2014 09:36
-
-
Save benjamintanweihao/0adfb3ccef4c2790efe1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Wiky.ParserChannel do | |
| use Phoenix.Channel | |
| def join(socket, "start-parser", message) do | |
| Wiky.Parser.start_link("/Users/benjamintan/Downloads/wiki.xml") | |
| Enum.map 1..100, fn _ -> | |
| reply socket, "join", Wiky.Parser.Agent.get_state | |
| end | |
| {:ok, socket} | |
| end | |
| def join(socket, _no, _message) do | |
| {:error, socket, :unauthorized} | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment