Okay so I tried using the (net.Socket) destroy function after dup:ing the 
fd, but this seems to cause socket hang up. How am I supposed to close the 
net.Socket so that I only have the dup left?

Den torsdag 25 februari 2016 kl. 17:07:12 UTC+1 skrev Alex Hultman:
>
> Okay I will try this out, thanks for the help.
>
> Den torsdag 25 februari 2016 kl. 17:03:51 UTC+1 skrev Saúl Ibarra Corretgé:
>>
>> On 02/25/2016 04:59 PM, Alex Hultman wrote: 
>> > Hi. 
>> > 
>> > I have tried dup but the doc states it creates two fds to the same 
>> > underlying "file". So the question is - are you sure closing the 
>> > net.Socket will not affect the duplicated fd as well? Or it doesn't 
>> work 
>> > like that? 
>> > 
>>
>> It doesn't work like that. If you have 2 fds (one was dup-ed) pointing 
>> to the same resource, it will be closed when the last fd is closed. 
>>
>>
>> Cheers, 
>>
>> -- 
>> Saúl Ibarra Corretgé 
>> bettercallsaghul.com 
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to