[erlang-questions] gen_tcp:transfer_ownership of socket to another node?

Tony Rogvall tony@REDACTED
Fri Jan 23 23:41:59 CET 2009

Here is the answer ;-)

(a@REDACTED)2> Pid = spawn(b@REDACTED, fun() -> receive X ->  
io:format("got ~p\n", [X]) end end).
(a@REDACTED)3> {ok,U} = inet_udp:open(0,[]).
(a@REDACTED)4> inet_udp:controlling_process(U, Pid).

I other words it is not allowed.

On 23 jan 2009, at 09.46, Thijs Terlouw wrote:

> What happens when I accept a new TCP connection (in processA) and  
> then transfer the ownership of that socket from processA to processB  
> which is running on another Erlang node(B)? I assume that Beam then  
> keeps 'something' running on the original node(A) to keep the  
> connection open, even if processA is killed?
> That way i would be able to send data to the socket from processB  
> after processA is killed? The data would then be copied from one VM  
> to another VM (because the socket cannot move of course)?
> Is this correct?
> Thijs Terlouw - China
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090123/99897dd7/attachment.htm>

More information about the erlang-questions mailing list