Question: 1.) Most of the posts I haved visited talk about the lack
of a winsock and work-arounds are dated about '02 - '05, In the mean
time has Microsoft come out winsock control for .Net ?
2.) I found two examples of Winsock controls written in vb.net and
can simply be added to you solution:
a.) http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6...
b.) http://www.codeproject.com/KB/vb/winsockdotnet.aspx?msg=3209348
Does anyone have any experience with any of these homegrown controls
and would you use them as is ? as a compiled control or added to you
solution as a user control ?
Or: Would you just add the Microsoft winsock from the COM tab under
references ?
Thanks
What specific functionality? You don't have to use the Socket class, there is
also the TcpListner and TcpClient classes. Which provide a simplified
interface. These classes support asynchronous calls and notification via
callbacks...
> Question: 1.) Most of the posts I haved visited talk about the lack
> of a winsock and work-arounds are dated about '02 - '05, In the mean
> time has Microsoft come out winsock control for .Net ?
>
No. TcpClient/TcpListener are the closest your going to get.
>
> 2.) I found two examples of Winsock controls written in vb.net and
> can simply be added to you solution:
> a.) http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6...
> b.) http://www.codeproject.com/KB/vb/winsockdotnet.aspx?msg=3209348
>
>
> Does anyone have any experience with any of these homegrown controls
> and would you use them as is ? as a compiled control or added to you
> solution as a user control ?
> Or: Would you just add the Microsoft winsock from the COM tab under
> references ?
No. I would learn to use the .NET socket classes. It's not all that hard,
and is in fact far superior in both performance and scalability then the old
winsock control...
--
Tom Shelton
Do you have any examples of how to set up the callbacks ?
For example, the TcpClient.BeginConnect method takes an AsyncCallback Delegate.
The asynchronous programming pattern is used throughout the framework and
is described here: http://msdn.microsoft.com/en-us/library/ms228969.aspx
(or respectively the same via F1) There you'll also find examples.
--
Armin