Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Example server removed

  • Loading branch information...
commit a6ef7dac9eaa438a21ef6d486b81a1b7a1e67abf 1 parent 8e29c1d
Ralf Weinbrecher authored
Showing with 1 addition and 62 deletions.
  1. +1 −2  ebin/xmlrpc.app
  2. +0 −60 src/example_serv.erl
View
3  ebin/xmlrpc.app
@@ -3,8 +3,7 @@
{application, xmlrpc,
[{description, "An HTTP 1.1 compliant XML-RPC library for Erlang"},
{vsn, "0.1.0"},
- {modules, [example_serv,
- tcp_serv,
+ {modules, [tcp_serv,
test,
xmlrpc_decode,
xmlrpc_encode,
View
60 src/example_serv.erl
@@ -1,60 +0,0 @@
--module(example_serv).
--author('jocke@gleipnir.com').
--export([start_link/2]).
--export([foo/1, bar/3]).
--export([init/2]).
-
--record(state, {}).
-
-%%
-%% API
-%%
-
-%% Exported: start_link/2
-
-start_link(Args, Timeout) ->
- Pid = spawn_link(?MODULE, init, [self(), Args]),
- receive
- {Pid, started} -> {ok, Pid};
- {Pid, Reason} -> Reason
- after Timeout -> {error, timeout}
- end.
-
-%% Exported: foo/1
-
-foo(Pid) -> foo ! Pid.
-
-%% Exported: bar/3
-
-bar(Pid, Timeout, Message) ->
- Pid !!
-
-
- {bar, Message, self()} ! Pid,
- receive
- {Pid, Result} -> Result
- after Timeout -> {error, timeout}
- end.
-
-%%
-%% Server
-%%
-
-%% Exported: init/2
-
-init(Parent, Args) ->
- Parent ! {self(), started},
- loop(#state{}).
-
-loop(State) ->
- receive
- stop ->
- stop;
-
- {bar, Message, From} ->
- {self(), Message},
- loop(State);
- UnknownMessage ->
- io:format("Unknown message: ~p~n", [UnknownMessage]),
- loop(State)
- end.
Please sign in to comment.
Something went wrong with that request. Please try again.