summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-07-21 13:59:59 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-07-21 13:59:59 +0100
commit169172e2ea254db5e1f609db568b31f41296b517 (patch)
tree165da7e9cfbadeac4e756a265cc66c5fdebd6a61
parent625b8f96c6ac75225c88116ccde1d243fca7a974 (diff)
downloadrabbitmq-server-git-169172e2ea254db5e1f609db568b31f41296b517.tar.gz
Add framing_channel:start_link/1 for use by Erlang client
-rw-r--r--src/rabbit_framing_channel.erl9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rabbit_framing_channel.erl b/src/rabbit_framing_channel.erl
index d07d871be9..b1e42e598c 100644
--- a/src/rabbit_framing_channel.erl
+++ b/src/rabbit_framing_channel.erl
@@ -32,7 +32,7 @@
-module(rabbit_framing_channel).
-include("rabbit.hrl").
--export([start_link/0, process/2, shutdown/1]).
+-export([start_link/0, start_link/1, process/2, shutdown/1]).
%% internal
-export([mainloop/1]).
@@ -40,9 +40,10 @@
%%--------------------------------------------------------------------
start_link() ->
- Parent = self(),
- {ok, proc_lib:spawn_link(
- fun () -> mainloop(rabbit_channel_sup:channel(Parent)) end)}.
+ start_link(rabbit_channel_sup:channel(self())).
+
+start_link(ChannelPid) ->
+ {ok, proc_lib:spawn_link(fun() -> mainloop(ChannelPid) end)}.
process(Pid, Frame) ->
Pid ! {frame, Frame},