Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Socket class
Message
From
20/11/2010 10:50:25
 
 
To
19/11/2010 15:17:34
General information
Forum:
ASP.NET
Category:
Forms
Title:
Environment versions
Environment:
C# 3.0
Application:
Desktop
Miscellaneous
Thread ID:
01489829
Message ID:
01489913
Views:
47
>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?

The Socket class has *no* events per se. But async callbacks are pretty straightforward (once you get used to the syntax)
Bear in mind that the ability to make asynchronous callbacks using BeginInvoke/EndInvoke is implemented at the heart of the .NET framework - if you're going to use .NET it's worth taking the time to understand how this is implemented (and how useful it can be):

http://msdn.microsoft.com/en-us/library/2e08f6yc(v=VS.100).aspx
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform