473,394 Members | 1,867 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,394 software developers and data experts.

Connected App (VB2005) Help...

I need to have an app run on several machines in a LAN. They all need to
know of each other's existence and be able to communicate simple messages
back and forth. These messages should be directed to all or just to an
individual.

I wrote this app in VB 2003. Basic Windows Forms programs with system tray
app, and they each connected to a Service on a machine.
The problem was that for some reason the service or the connections don't
seem to survive to the next day. I have no idea why. I have notice other
people's VB services that seem to hang over time.

1.) Any thoughts on why VB services hang?
2.) There may be a better way to do this. I original took the sample code
for a chat program and modified it to do this sort of thing. Is there a
better way to accomplish this? Would you recommend doing so without the
need of a service? Basically I want each user to have this app. It should
start up on login and automatically be in communication with the same app on
all other computers and thus be able to receive messages and respond.

Any suggestions/links as to how I can learn to do this better and so that it
doesn't hang up would be greatly appreciated.

Thanks,

Shane
Dec 12 '06 #1
3 1160

Shane Story wrote:
I need to have an app run on several machines in a LAN. They all need to
know of each other's existence and be able to communicate simple messages
back and forth. These messages should be directed to all or just to an
individual.

I wrote this app in VB 2003. Basic Windows Forms programs with system tray
app, and they each connected to a Service on a machine.
The problem was that for some reason the service or the connections don't
seem to survive to the next day. I have no idea why. I have notice other
people's VB services that seem to hang over time.
Is it possilbe that the machine is powering down the nic? I've had it
happen.
1.) Any thoughts on why VB services hang
2.) There may be a better way to do this. I original took the sample code
for a chat program and modified it to do this sort of thing. Is there a
better way to accomplish this? Would you recommend doing so without the
need of a service? Basically I want each user to have this app. It should
start up on login and automatically be in communication with the same app on
all other computers and thus be able to receive messages and respond.

Any suggestions/links as to how I can learn to do this better and so that it
doesn't hang up would be greatly appreciated.
Your on a LAN, so I might consider that each client could on startup
send out a simple UDP brodcast, telling anyone interested that they are
alive. all other clients could respond with a udp brodcast of their
own giving up their locations. they could broadcast their locations,
so then you could establish a tcp connection if reliable transport is
required.

--
Tom Shelton

Dec 12 '06 #2
Tom,

Thanks for the reply. I suppose that could be happening. Whatever happens,
it won't work again until I restart the service.
I am very new to TCP UDP programming. I just took this example and did the
best I could.

Ok. I have thought of UDP. To broadcast, do open IP 255--the broadcast IP
for our network? Or is there some easier way? It's the technicality of all
of this as well as the theory that I am still fuzzy on. With TCP and a
server, I at least knew where (IP-wise) I was connnecting. I want this
program to be flexible enough that if it works fine here, I could let other
people install it also. I guess then if I did a broadcast and you do use
the broadcast IP (255), what do you do if the network does subnetting so
that 255 isn't the broadcast? Is there a way to find that out? Am I totally
off track on me thinking?

Any good material I could read to better understand this?

Thanks,

"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@80g2000cwy.googlegro ups.com...
>
Shane Story wrote:
>I need to have an app run on several machines in a LAN. They all need to
know of each other's existence and be able to communicate simple messages
back and forth. These messages should be directed to all or just to an
individual.

I wrote this app in VB 2003. Basic Windows Forms programs with system
tray
app, and they each connected to a Service on a machine.
The problem was that for some reason the service or the connections don't
seem to survive to the next day. I have no idea why. I have notice
other
people's VB services that seem to hang over time.

Is it possilbe that the machine is powering down the nic? I've had it
happen.
>1.) Any thoughts on why VB services hang
2.) There may be a better way to do this. I original took the sample
code
for a chat program and modified it to do this sort of thing. Is there a
better way to accomplish this? Would you recommend doing so without the
need of a service? Basically I want each user to have this app. It
should
start up on login and automatically be in communication with the same app
on
all other computers and thus be able to receive messages and respond.

Any suggestions/links as to how I can learn to do this better and so that
it
doesn't hang up would be greatly appreciated.

Your on a LAN, so I might consider that each client could on startup
send out a simple UDP brodcast, telling anyone interested that they are
alive. all other clients could respond with a udp brodcast of their
own giving up their locations. they could broadcast their locations,
so then you could establish a tcp connection if reliable transport is
required.

--
Tom Shelton

Dec 12 '06 #3
I found some great code for UDP and got it working.

Thanks Tom
"Tom Shelton" <to*********@comcast.netwrote in message
news:11**********************@80g2000cwy.googlegro ups.com...
>
Shane Story wrote:
>I need to have an app run on several machines in a LAN. They all need to
know of each other's existence and be able to communicate simple messages
back and forth. These messages should be directed to all or just to an
individual.

I wrote this app in VB 2003. Basic Windows Forms programs with system
tray
app, and they each connected to a Service on a machine.
The problem was that for some reason the service or the connections don't
seem to survive to the next day. I have no idea why. I have notice
other
people's VB services that seem to hang over time.

Is it possilbe that the machine is powering down the nic? I've had it
happen.
>1.) Any thoughts on why VB services hang
2.) There may be a better way to do this. I original took the sample
code
for a chat program and modified it to do this sort of thing. Is there a
better way to accomplish this? Would you recommend doing so without the
need of a service? Basically I want each user to have this app. It
should
start up on login and automatically be in communication with the same app
on
all other computers and thus be able to receive messages and respond.

Any suggestions/links as to how I can learn to do this better and so that
it
doesn't hang up would be greatly appreciated.

Your on a LAN, so I might consider that each client could on startup
send out a simple UDP brodcast, telling anyone interested that they are
alive. all other clients could respond with a udp brodcast of their
own giving up their locations. they could broadcast their locations,
so then you could establish a tcp connection if reliable transport is
required.

--
Tom Shelton

Dec 14 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Chas | last post by:
Before I start down the road with my first VB2005 app, how do I distribute the finished app? Assuming it is strictly a standalone, how do you create the install package? I am coming from the VB6...
5
by: Chris Devol | last post by:
My dial-up connection sometimes hangs up and has to re-connect. The VB2005 installer/downloader apparently doesn't know how to resume when the connection is re-established. It just aborts! I've...
1
by: Galen Somerville | last post by:
I uninstalled and reinstalled VB6. When I have an unhandled exception in VB6, it uses the VB2005 Pro debugger. There is no way to leave the VB2005 debugger without ending up at the desktop. How...
2
by: Omar Abid | last post by:
Hi, This the best site where you can find Hi members, We are happy to tell that if you search for : jobs with high wage or to debug a program or to find a good source code and to make a good...
7
by: TAVOSOFT | last post by:
Hi friends, I am begginer , I wanna to learn VB2005 ,Which are good book for to learn VB2005 of level -begginer-intermediate. Thanks you friends.
1
by: erickwan88 | last post by:
I am doing a final year project for my school and is going to provide for an organization, so I am asking for some help on here. Indeed, I have no idea on how to get the input from my pen driver...
15
by: Aalaan | last post by:
I am presently a user of classic vb6 and hang out on those newsgroups. Some of you may be aware that there is a very anti MS and vb2005 feeling there. I have tried to get them to tell me which...
1
by: Vae07 | last post by:
Ok so here is a brief summary of my problem. I need a pop up form that submits input text box information to a pocket excel workbook upon a command botton click. Text box inputs are checked for...
2
by: slimshedyback | last post by:
i build an application in vb2005 and when i finish i copy my application to another pc and it show me an errror which is unexpected" i know the previus versions of vb and vb6 is simple to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.