Hi all,

I'm developing an IP client/server program for transferring files. It's all working (surprisingly!) well, except for:-

If a client is uploading a file, and that connection is unexpectedly terminated (phone line drops out, client PC crashes, etc) the connection remains on my server and leaves a permanently open partially transmitted file on the server's hard drive (until such time as I manually close the connection and delete the file).

How then, do I detect that a connection has closed unexpectedly, and gracefully close the socket at the server end, and delete the partially transmitted file?

Mark