NT Service and Sockets
- From: "Steve West" <some@xxxxxxxxxxxxx>
- Date: Wed, 18 Oct 2006 15:24:55 +0100
Hello
I'm wondering if someone can help me out with a socketty problem within an
NT service application.
The application is very simple -it sits in the background looking at a list
of email accounts and periodically downloads any new emails it finds. The
emails are downloaded to a shared server folder and then details written
away to a database.
The database in question is a MUMPs - or m21- database, but the nature of
the database is unimportant.
The service app connects to the database via an IP address and socket. Once
connected , it does it stuff and then closes the connection - so the
connection is only ever open for a brief preiod of time.
Now every so often, when it opens the connection it reports "Socket already
in use". No it bl**dy well isn't.
The part of the application that writes to the database is within a Thread
(there is only ever one of these). The entire functionality of the code is
surrounded by Critical Sections and there's no chance that the code can be
executed twice concurrently. The code is virtually saturated in log file
commands so that I can pinpoint exactly where the error occurs and this is
when the socket connects.
I'm using delphi 7, socket components are OverbyteICSWSocket.
I'm completely stumped by this problem. It occurs more frequently if the PC
is under load, less frequently (but still regularly happens) if the PC is
doing relatively nothing. I've even tried introducing delays and sleeps and
ProcessRequests, but with no success.
Hope someone can help, but any contribution is appreciated.
Thanks
Steve
.
- Follow-Ups:
- Re: NT Service and Sockets
- From: Dirk Claessens
- Re: NT Service and Sockets
- Prev by Date: Detecting WIN32 or .NET example in a compiler directive
- Next by Date: This post is utter and complete spam. Anyone want a job?
- Previous by thread: Detecting WIN32 or .NET example in a compiler directive
- Next by thread: Re: NT Service and Sockets
- Index(es):
Relevant Pages
|