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

TCP/IP Socket communication from multiple clients

P: n/a
Hi,

In the past I created a VB6 application that was capable of accepting
multiple client connections for status logging over the internet using
simple non-Windows clients (GSM/GPRS). There is one management
console/monitor that receives messages and keeps track of keep-alive
polling. The monitor created a new WinSock connection for each client that
logged on. These were put into an array of controls. I'm sure this can also
be done with VB.NET.

I want to convert this application to VB.NET using VS2005 and the .NET
Framework 2.0. But I run into several problems. Are there any good examples
of GUI examples on sites to study on so I can convert my application
succesfully (most of it is converted, except the communication). Most sites
show samples as console apps and simply copy-paste doesn't work (100% CPU
load and crashing).
Jeroen

Feb 12 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a

rotzooi ( freely translated to crappy ,,,,,,, i hope you are not
refering to this groups answers ) ???

I believe that the biggest problem of a lot of people who are rewriting VB6
proggy`s to .Net is that they not look to the new technologies that .Net has
to offer
( why would you rewrite the project then is my question )

why not use a webservice for the web comunication part ?? opr choose another
new aproach as simply rewriting the VB6 code
instead of the winsock control you can now use a suitable framework class
( tcpclient , udpclient ) and yes you can create arrays of them

regards

Michel Posseth [MCP]
"Rotzooi" <ro*****@bukowonen.nl> schreef in bericht
news:uI**************@TK2MSFTNGP14.phx.gbl...
Hi,

In the past I created a VB6 application that was capable of accepting
multiple client connections for status logging over the internet using
simple non-Windows clients (GSM/GPRS). There is one management
console/monitor that receives messages and keeps track of keep-alive
polling. The monitor created a new WinSock connection for each client that
logged on. These were put into an array of controls. I'm sure this can
also be done with VB.NET.

I want to convert this application to VB.NET using VS2005 and the .NET
Framework 2.0. But I run into several problems. Are there any good
examples of GUI examples on sites to study on so I can convert my
application succesfully (most of it is converted, except the
communication). Most sites show samples as console apps and simply
copy-paste doesn't work (100% CPU load and crashing).
Jeroen

Feb 12 '06 #2

P: n/a
Thanks for the reply.

My newly written app is based on the functionality of the VB6 version, but
it's a complete remake. The reason for using simple socket communication is
that many status reports use a GPRS mobile connection (field units powered
by a battery and solar cell) and payment for the mobile services is for the
traffic used. So a single byte to verify the connection and send the staus
is enough (pretty much light weight). I would like to use XML or other
webbased services, but they generate an awfull lot of overhead.

I've had a look at the many samples about tcpClient and the
System.Net.Sockets but my biggest problem is building the array with socket
connections (multiple clients connecting at the same time).
Jeroen
"m.posseth" <po*****@planet.nl> schreef in bericht
news:el**************@TK2MSFTNGP09.phx.gbl...

rotzooi ( freely translated to crappy ,,,,,,, i hope you are not
refering to this groups answers ) ???

I believe that the biggest problem of a lot of people who are rewriting
VB6 proggy`s to .Net is that they not look to the new technologies that
.Net has to offer
( why would you rewrite the project then is my question )

why not use a webservice for the web comunication part ?? opr choose
another new aproach as simply rewriting the VB6 code
instead of the winsock control you can now use a suitable framework class
( tcpclient , udpclient ) and yes you can create arrays of them

regards

Michel Posseth [MCP]
"Rotzooi" <ro*****@bukowonen.nl> schreef in bericht
news:uI**************@TK2MSFTNGP14.phx.gbl...
Hi,

In the past I created a VB6 application that was capable of accepting
multiple client connections for status logging over the internet using
simple non-Windows clients (GSM/GPRS). There is one management
console/monitor that receives messages and keeps track of keep-alive
polling. The monitor created a new WinSock connection for each client
that logged on. These were put into an array of controls. I'm sure this
can also be done with VB.NET.

I want to convert this application to VB.NET using VS2005 and the .NET
Framework 2.0. But I run into several problems. Are there any good
examples of GUI examples on sites to study on so I can convert my
application succesfully (most of it is converted, except the
communication). Most sites show samples as console apps and simply
copy-paste doesn't work (100% CPU load and crashing).
Jeroen


Feb 13 '06 #3

P: n/a
cj
Rotzooi,

I'm just getting started on a very similar project. I'm new to .net and
have been asking questions here too. It would seem the way to make a
TCP/IP server in .net is using threading instead of an array. It took
quite a bit to get my mind around it but actually it seems pretty
simple. This article was helpful to me on threading
http://www.devx.com/DevX/10MinuteSol...5/1954?pf=true

For the communications I'll be using SocketWrench which is part of the
Socket Tools package written by http://www.catalyst.com/ I even got a
sample program for .net that shows how to set up a echo server that
accepts multiple simultaneous connects. I seem to have misplaced the
link but if you want it let me know and I'll try to find it.

While I'm using purchased software, there is a free version. Some info
on it can be found here
http://www.catalyst.com/products/soc...ial/index.html
Rotzooi wrote:
Hi,

In the past I created a VB6 application that was capable of accepting
multiple client connections for status logging over the internet using
simple non-Windows clients (GSM/GPRS). There is one management
console/monitor that receives messages and keeps track of keep-alive
polling. The monitor created a new WinSock connection for each client that
logged on. These were put into an array of controls. I'm sure this can also
be done with VB.NET.

I want to convert this application to VB.NET using VS2005 and the .NET
Framework 2.0. But I run into several problems. Are there any good examples
of GUI examples on sites to study on so I can convert my application
succesfully (most of it is converted, except the communication). Most sites
show samples as console apps and simply copy-paste doesn't work (100% CPU
load and crashing).
Jeroen

Feb 13 '06 #4

P: n/a
thanks
Feb 13 '06 #5

P: n/a
cj
Found the link I misplaced. Here it is. This post is by a Catalyst
employee and he writes a step by step example of a multithreaded echo
server in this post.
http://forums.catalyst.com/viewtopic.php?t=36
cj wrote:
Rotzooi,

I'm just getting started on a very similar project. I'm new to .net and
have been asking questions here too. It would seem the way to make a
TCP/IP server in .net is using threading instead of an array. It took
quite a bit to get my mind around it but actually it seems pretty
simple. This article was helpful to me on threading
http://www.devx.com/DevX/10MinuteSol...5/1954?pf=true

For the communications I'll be using SocketWrench which is part of the
Socket Tools package written by http://www.catalyst.com/ I even got a
sample program for .net that shows how to set up a echo server that
accepts multiple simultaneous connects. I seem to have misplaced the
link but if you want it let me know and I'll try to find it.

While I'm using purchased software, there is a free version. Some info
on it can be found here
http://www.catalyst.com/products/soc...ial/index.html
Rotzooi wrote:
Hi,

In the past I created a VB6 application that was capable of accepting
multiple client connections for status logging over the internet using
simple non-Windows clients (GSM/GPRS). There is one management
console/monitor that receives messages and keeps track of keep-alive
polling. The monitor created a new WinSock connection for each client
that logged on. These were put into an array of controls. I'm sure
this can also be done with VB.NET.

I want to convert this application to VB.NET using VS2005 and the .NET
Framework 2.0. But I run into several problems. Are there any good
examples of GUI examples on sites to study on so I can convert my
application succesfully (most of it is converted, except the
communication). Most sites show samples as console apps and simply
copy-paste doesn't work (100% CPU load and crashing).
Jeroen

Feb 13 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.