<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
IIUC, {fd, integer() >= 0} allows to use the socket received from
socket() C function (or somehow else, but I can't propose another
way).<br>
<br>
> Is there a way to receive controlling process of the socket?<br>
If we managed to get the port (though I still don't know the way),
the controlling process can be obtained as following:<br>
{_, Pid} = erlang:port_info(Port, connected).<br>
<br>
<div class="moz-cite-prefix">On 02/06/2017 04:30 PM, Steve Vinoski
wrote:<br>
</div>
<blockquote
cite="mid:CAO+zUOVBqk69XR0UDtTtOpd2TvBx7F24Aq=oGmd9M1CNA+PftA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Feb 6, 2017 at 8:18 AM,
Salikhov Dinislam <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:Dinislam.Salikhov@kaspersky.com"
target="_blank">Dinislam.Salikhov@kaspersky.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hi!<br>
<br>
I have a Unix file descriptor of Erlang VM process.<br>
I know that it is a TCP socket in ESTABLISHED state.<br>
Is there a way to receive an Erlang port of the socket?<br>
Is there a way to receive controlling process of the
socket?</blockquote>
<div><br>
</div>
<div>See theĀ {fd, integer() >= 0} option that various
gen_tcp functions can take:</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://erlang.org/doc/man/gen_tcp.html">http://erlang.org/doc/man/gen_tcp.html</a><br>
</div>
<div><br>
</div>
<div>--steve</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>