TCP/IP Socket communication from multiple clients

R

Rotzooi

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
 
M

m.posseth

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]
 
R

Rotzooi

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 said:
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 said:
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
 
C

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/10MinuteSolution/20365/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
 

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