Solved

500pts: UDP/TCP to send a msg to users of a program?

Posted on 2006-11-10
4
194 Views
Last Modified: 2010-04-16
Hi there,

I wonder if anyone can help, I have a program that is succesfully working, it is used by 100s of users. The program depends on webservices etc so from time to time i must take the program down.

I have no way of informing the users that the program is going offline so i was wondering if i could do this with udp or tcp. UDP i presume is a better choice..

Considering that the users probably don't have a FIXED ip.

Does anyone know of a sample where I could send a msg to 100's of users.

I presume i will have a small server program, and then i will build a small client into my program... this will receive a msg and then i will just used MEssageBox.Show to display it...

My confusion is.... which port do i use? and the server... does it need to send directly to IP (fixed) addresses.... I understand that with UDP i do not need to establish a connection so how would i send the info to the user then?

if there are 3 users for example that are in the same office connected by an adsl router then technically they would have the same IP address so how would this work?

I presume .net Vs2003 supports this?

Thanks in advance for any help

Ian
0
Comment
Question by:ianinspain
  • 2
4 Comments
 
LVL 15

Expert Comment

by:ozymandias
ID: 17915352
So your server program is going to send a message to the client warning that the system is goind down for a while.
Your client application will have to listen on a port for a message sent to its Ip adress. It can be any port.
The other possibility would be to use multicast or broadcast.
Or you could just have the message client poll a message queue on the server, say, every 10 seconds and if it finds a message its displays it to the user.
That way you could just publish the shutdown warning on the message queue and within 20 seconds or so be pretty sure that every client has received it.
0
 
LVL 15

Accepted Solution

by:
ozymandias earned 250 total points
ID: 17915401
The polling may not be practical and multicasting is quite neat provided that it is supported.
Here is an example : http://www.codeproject.com/cs/internet/multicast.asp
0
 
LVL 3

Assisted Solution

by:bromose
bromose earned 250 total points
ID: 17921445
Hi
I have a multicasting solution that will work on a LAN, but getting multicasting working across the internet is a different story. How ever if you have Your users on a virtual LAN, and the routers will allow multicasting - it's an option. Let me know if you want the multicast-code. Otherwise I must concur with ozymandias on his comments on polling the server.

Best regards,
Kaj Bromose
0
 

Author Comment

by:ianinspain
ID: 17966506
thanks guys!

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now