Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows service - best practice for OnStart
Message
 
À
21/09/2005 15:56:50
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01051752
Message ID:
01051779
Vues:
14
Hello Keith,

>> Does the service need the "never-ending stuff" to intialize?

No, the service initializes, then goes into a never-ending loop. More precisely, it listenens for socket connections. So what I'm doing now is initializing in OnStart, then start a thread (also in OnStart). The thread's method is a never-ending loop that blocks on Socket.Listen, then continues once a connection is accepted, loops and waits for the next connection.

Is this the same idea as your suggestion?

Thanks,
Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform