winsock in dotnet

K

kc

Hi

Just upgrading a app from VB6 to VB.Net. All is going well apart from the
Winsock control.
The first thing we notice is that there does not appear to be a .Net version
(please correct me if wrong).

Also when we use the VB6 winsock control in a dotnet version we appear to
lose the ability of creating an array on winsock's.
for example we cannot assign as thus
Winsock(0).LocalPort = localSocket
Winsock(0).Listen
We program starts
And -
Load Winsock(ExtraSocket)
Does not allow a extra connection.

Therefore we are looking for a alternative to the VB6 method but as yet
connot find it. Could anyone suggest alternatives or point me towards some
good info on .net winsock methods

Thanks
 
J

James Thresher

Have a look at the System.Net.Sockets namespace, you should find
everything you need in there.
 
J

James Thresher

You will not be .able to create control arrays in NET as they are no
longer supported (You can however create arrays of controls, but they
won't work in the form designer, you would have to manage them entirely
in code).

The two items you want to look at the closest are the TcpClient and
TcpListener, these are about the closest .NET equivalent to the winsock
control and can be found in the System.Net.Sockets namespace.
 
G

Guest

if you want a sample of an async connection, i can provide code that creates
an async connection and that can send text
 
G

Guest

scratch my last reply, i have come accross a WinSock item made for VB.net.
You can use it from the toolbar and it will work async. if you would like
this, just say so and i can send it
 
K

kc

Thanks James



James Thresher said:
You will not be .able to create control arrays in NET as they are no
longer supported (You can however create arrays of controls, but they
won't work in the form designer, you would have to manage them entirely in
code).

The two items you want to look at the closest are the TcpClient and
TcpListener, these are about the closest .NET equivalent to the winsock
control and can be found in the System.Net.Sockets namespace.
 

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

Top