> On Aug 6, 2020, at 1:23 AM, Ben Noordhuis <[email protected]> wrote:
> 
> On Wed, Aug 5, 2020 at 4:48 PM Bill Engelke <[email protected]> wrote:
>> 
>> I have a program which acts as a server; I want it to listen on a port.  
>> Sometimes, many hours go by before any traffic comes to the port; I think 
>> this port is timing out and closing.
>> 
>> What is the correct way to keep this port open when using libuv? I have 
>> looked at a variety of ways to do this (e.g., setting socket options, etc.) 
>> but I don't know which is best for use in libuv...
> 
> If the socket listens on a port (i.e., is a server socket), there
> should be no issue with long periods of inactivity. (It's a different
> story with peer sockets but I infer that's not what you mean.)
> 
> If the port becomes unreachable after a while, it's possible you have
> a time-based firewall rule somewhere that closes it off.
> 


I think he’s referring to connected sockets.

See SO_KEEPALIVE in socket(5).


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/libuv/BA113171-48D5-4C83-86AC-24C22EB8CC9A%40gmail.com.

Reply via email to