Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Socket class
Message
From
20/11/2010 09:26:32
 
General information
Forum:
ASP.NET
Category:
Forms
Title:
Environment versions
Environment:
C# 3.0
Application:
Desktop
Miscellaneous
Thread ID:
01489829
Message ID:
01489898
Views:
44
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform