vb.net and winsock


S

sid

I am converting some apps from vb6 to vb.net and I need to implement
the functionality of a winsock. I am finding out that .Net does not
support a classic winsock control, but now expects you to use the
Sockets class and code a lot of the functionality yourself ?

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
 
Ad

Advertisements

T

Tom Shelton

I am converting some apps from vb6 to vb.net and I need to implement
the functionality of a winsock. I am finding out that .Net does not
support a classic winsock control, but now expects you to use the
Sockets class and code a lot of the functionality yourself ?

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...
 
S

sid

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...  


No. TcpClient/TcpListener are the closest your going to get.  





No.  I would learn to use the .NET socket classes.  It's not all thathard,
and is in fact far superior in both performance and scalability then the old
winsock control...

Do you have any examples of how to set up the callbacks ?
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top