Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Socket class
Message
De
20/11/2010 09:26:32
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Titre:
Versions des environnements
Environment:
C# 3.0
Application:
Desktop
Divers
Thread ID:
01489829
Message ID:
01489898
Vues:
43
>I'm really just started with .NET (mostly for fun :o)
>I have to listen a TCP port for some data, but I do not want to do this in a loop.
>What Event I should handle?
>Every example I found is put the code in a loop (or a very complex async code).
>In the very old WinSock colntrol there was a DataArival event, where it is in Socket class?
>
>I just want this to be an event handled form :-)
>TIA



Read this http://msdn.microsoft.com/en-us/magazine/cc300760.aspx
It covers
(1) Threaded sever :Creating a thread for each client
(2) select for multiplexed IO
(3) an async server (around figure 7) with delegates ( = your DataArrival event)
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform