By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,087 Members | 1,513 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,087 IT Pros & Developers. It's quick & easy.

winsock in dotnet

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Have a look at the System.Net.Sockets namespace, you should find
everything you need in there.

kc wrote:
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

Nov 21 '05 #2

P: n/a
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.

kc wrote:
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

Nov 21 '05 #3

P: n/a
if you want a sample of an async connection, i can provide code that creates
an async connection and that can send text
Nov 21 '05 #4

P: n/a
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
Nov 21 '05 #5

P: n/a
kc
Thanks James

"James Thresher" <Ja************@NOSPAM.Jaama.co.uk> wrote in message
news:di*******************@news.demon.co.uk...
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.

kc wrote:
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

Nov 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.