Re: Timeout for connect()
From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 03/01/04
- Next message: Barry Margolin: "Re: connect() ing from within server"
- Previous message: Barry Margolin: "Re: implementing a firewall from scratch"
- In reply to: Jo: "Re: Timeout for connect()"
- Next in thread: David Schwartz: "Re: Timeout for connect()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 01 Mar 2004 16:21:20 -0500
In article <72ce7f0c.0403010952.573dc94f@posting.google.com>,
JoJoTwilligo@hotmail.com (Jo) wrote:
> That's what I was thinking of. Is there any danger in closing a
> socket that hasn't been opened? If not, then I would think the proper
> solution would be to close the socket once you know that the connect
> is to be canceled.
Once you create the socket using socket(), you *must* close it when
you're not interested in using it any more. I guess what you meant was
"is there any danger in closing a socket whose *connection* hasn't been
opened?" No, there isn't -- listening sockets don't have open
connections and it's fine to close them.
-- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***
- Next message: Barry Margolin: "Re: connect() ing from within server"
- Previous message: Barry Margolin: "Re: implementing a firewall from scratch"
- In reply to: Jo: "Re: Timeout for connect()"
- Next in thread: David Schwartz: "Re: Timeout for connect()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|