<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR></HEAD>
<BODY>
<DIV>After what ? where should I add your line ?</DIV>
<DIV> </DIV>
<DIV>Yes, you just need to make sure the socket<BR>is opened in active mode, or
set it to active after<BR><BR>inet:setopts(Socket, [{active,
once}]),<BR><BR></DIV>
<DIV class=gmail_quote>2009/4/2 Gamoto <SPAN
dir=ltr><gamoto@bluewin.ch></SPAN><BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Is
this possible for one process to receive messages from two sources whose one
of these is a socket ?<BR><BR>Example<BR><BR>my_process(Socket)-><BR>
receive<BR>
{tcp,Socket,Bin}->
%equivalent to gen_tcp:recv(Socket,0) ????<BR>
...
%handle Bin<BR>
my_process(Socket); %loop<BR>
{msg,Message} ->
%from another process<BR>
...
%handle Message i.e gen_send(Socket,Message)<BR>
my_process(Socket); %loop<BR>
end.<BR><BR>_______________________________________________<BR>erlang-questions
mailing list<BR><A
href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</A><BR><A
href="http://www.erlang.org/mailman/listinfo/erlang-questions"
target=_blank>http://www.erlang.org/mailman/listinfo/erlang-questions</A><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>