473,320 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

TCP/IP Socket communication from multiple clients

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
5 15074

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
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
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
thanks
Feb 13 '06 #5
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: faktujaa | last post by:
Hi, I am having some problem with callback used in socket implementation. private static void Connect(string strPrtrIPAddr, int intPrtrPort, ref Socket rsocClient) { try { // Create remote end...
4
by: Sa¹o Zagoranski | last post by:
Hi! I'm writing a simple 3D First person shooter game. It is a multiplayer game, where all the players connect to one server.
13
by: coloradowebdev | last post by:
i am working on basically a proxy server that handles requests via remoting from clients and executes transactions against a third-party server via TCP. the remoting site works like a champ. my...
2
by: Ben | last post by:
I need to send data from a client to a server. In the server code I have: s = ServerSocket.Accept() If (s.Connected = False) Then MsgBox("Unable to connect", , "Server Error") Exit Sub End...
14
by: DaTurk | last post by:
I am makeing a Multicast server client setup and was wondering what the difference is between Socket.Connect, and Socket.Bind. It may be a stupid question, but I was just curious. Because I...
9
by: semedao | last post by:
Hi, I am using sync and async operations on the same socket. generally I want the socket to wait on BeginReceive and to not block the object thread. but in some cases I want to stop the...
4
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket...
0
by: craze3 | last post by:
I have programmed an XML Socket Server to communicate with Flash. It doesn't print out the messages it has received from the flash until the server has been shut down. Any ideas? The part with...
0
by: kaps | last post by:
Hi all, After reading for a while I have successfully prepared a server side listening and accepting multiple connections, and a client connecting to server. I need help on loop of send/receive...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.