Home All Groups Group Topic Archive Search About

TCP/IP Socket communication from multiple clients

Author
12 Feb 2006 4:32 PM
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

Author
12 Feb 2006 5:52 PM
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]


Show quoteHide quote
"Rotzooi" <rotz***@bukowonen.nl> schreef in bericht
news:uIUwtH$LGHA.2040@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
>
>
>
Author
13 Feb 2006 12:42 PM
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


Show quoteHide quote
"m.posseth" <poss***@planet.nl> schreef in bericht
news:elfGaz$LGHA.1180@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" <rotz***@bukowonen.nl> schreef in bericht
> news:uIUwtH$LGHA.2040@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
>>
>>
>>
>
>
Author
13 Feb 2006 2:19 PM
olympics
thanks
Author
13 Feb 2006 1:40 PM
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
on it can be found here
http://www.catalyst.com/products/socketwrench/tutorial/index.html


Rotzooi wrote:
Show quoteHide quote
> 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
>
>
>
Author
13 Feb 2006 3:33 PM
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:
Show quoteHide quote
> 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
> on it can be found here
> http://www.catalyst.com/products/socketwrench/tutorial/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
>>
>>
>>