Created
April 6, 2014 06:19
-
-
Save txrev319/10002189 to your computer and use it in GitHub Desktop.
This file contains 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
websocket_handle({text, Msg}, Req, State) -> | |
try _X = lists:flatten(io_lib:format("~p", [erldn:parse_str(Msg)])) of | |
_ -> {reply, {text, <<"That's what she said! ", Msg/binary >>}, Req, State} | |
catch | |
_ -> {reply, {text, <<"ERROR Parsing", Msg/binary >>}, Req, State} | |
end; | |
websocket_handle(_Data, Req, State) -> | |
{ok, Req, State}. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment