[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: about accpet system call
>
> i have made simple client/server application in C. When my
> client disconnect from server i get close state in "netstat -a" and it
> remains for hours. I have checked my code i have used "close(sockfd)" at
> proper places.
Have you checked the state of the connection on the client *and* the
server machine?
One solution may be using shutdown before close. I remember reading in the
fetchmail changelog that fetchmail had a similar problem on some weird
unix and the way to solve it was shutdown followed by close.
----------------------------------------------------------------
Kedar N. Patankar.
Senior Software Engineer.
ishoni Networks
...Broadband for everyone
http://www.ishoni.com
email - kedar@xxxxxxxxxx
Phone: +91-80-2292125 (Work)
Fax: +91-80-2995545 (Work)
----------------------------------------------------------------
Be regular and orderly in your life, so that you may be violent
and original in your work.