UDP and broadcast question

Hej,

I have a question regarding UDP and broadcasting.



I have written a couple of applications.  It would be wrong to call them 
client and server - more like parent and child.



Initially I wanted to broadcast the availability of the child programs to 
the parent so I used a TidUDPClient component in the child applications, and 
a tidUDPServer component in the parent application.  The child application 
sends an "I am here" message every 10 minutes.



This seemed to work fine.



Then I decided that I wanted the parent application to issue a "Are you 
there" message to all the clients and get them to respond.  So I changed the 
component I was using in the child application to a tidUDPServer so that it 
could listen for the messages.



I think now that I have discovered that you can't have two TidUDPServers 
listening on the same port.  So I changed it so that the two types of 
messages used different ports.  That works fine until you have two child 
applications running on the same PC.



Is the solution to change the frequency of the "I am here" messages (say 
every 30 seconds) so that the parent knows they exist - or is there a more 
elegant solution that I have not found?



The only limitation I have is that there can be more than one child running 
on a pc, and a child may be running on the same machine as the parent.



Thanks for any advice.



/Richard
0
Richard
8/19/2008 9:38:39 AM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

1 Replies
1295 Views

Similar Articles

[PageSpeed] 0

"Richard Bibby" <richardjbibby@hotmail.com> wrote in message 
news:4479@forums.codegear.com...

> I think now that I have discovered that you can't have two
> TidUDPServers listening on the same port.

Correct.

> That works fine until you have two child applications running on the same 
> PC.

Then your children can't use UDP servers, since they would conflict with 
each other.

> Is the solution to change the frequency of the "I am here"
> messages (say every 30 seconds)

That is one option.

> is there a more elegant solution that I have not found?

Another option would be to introduce an intermediary between the children 
and parents.  The children can register with the intermediary, who then 
listens on a single port and responds to all "Are you there" requests on 
behalf on all children that are registered with it.


Gambit
0
Remy
8/20/2008 7:48:35 AM
Reply:

Similar Artilces:

Delphi and Delphi Prism licensing question
When I buy Delphi and Delphi Prism, do I get a "named user licence" or a "workstation licence"? Can I install both products on two machines I use with the same licence keys? I have a Mac Pro ("Cyrus") running Vista 64 in VMware and a MacBook ("Blacky") running Vista 32 in Parallels. Can I install Delphi and Delphi Prism on both Cyrus and Blacky since I use both machines (and like to have all dev tools I use installed on both machines at all times)? Andrew Brehm wrote: > When I buy Delphi and Delphi Prism, do I get a "named user licence...

Question about Delphi 2009 vs Delphi 7
Hi, I was wondering if any of you can point me to a URLs that show the most important improvements between these versions of Delphi. The objective is convincing the powers-that-pay-the-bills that moving to D2009 (that we'd have to purchase) is a better idea than moving to D7 (for which we have licenses). Fire at will! -- Saluti, Alessandro Federici ------------------------------- "I have been through some terrible things in my life, some of which actually happened." (Mark Twain) Alessandro Federici wrote: > Hi, > I was wondering if any of yo...

windows ME questions, questions, questions.......
Hi, my next PC will be running Windows ME. The PC will be supplied via my work, so there's no choice here for me (ME?) (I think I would have preferred 98 SE). The harddisk (40GB matrox) will have ME installed, and both the Windows ME set-up files and an image of the initial Harddisk 'on a hidden partition'. Word has it that this partition is not seen by Format nor FDisk. Is this really possible? No Windows CD will be supplied. Seems a new way of MS to encourage working with licensed software only. Anyone familiar with this way of distributing an OS? Will I be able to ...

UDP broadcast
In an attempt to write a simple DHCP server, I need to broadcast (i.e. send to 255.255.255.255) the Offer and Acknowledge UDP messages back to the client, but it doesn't seem to be possible to get out of the PC. I have a feeling the Windows or something else it blocking it. And yes, I have allowed broadcast with a {code} checkCall := setsockopt(sktSocket, SOL_SOCKET, SO_BROADCAST, @broadcastOn, 4); {code} I have also tried Indy UDP server component with the same result. Anything else I am missing, or is it just not possible on a regular Windows PC? Thanks, Jens. Jens wr...

Delphi question
Has anyone successfully run batch commands with paramaters from a TQuery in Delphi? The following two snippets run successfully: 1. DELETE FROM INVADJD WHERE RefNo = :RefNo 2. BEGIN DELETE FROM INVADJ WHERE RefNo = 10000; DELETE FROM INVADJD WHERE RefNo = 10000; END; However both of the following result in the error "Wrong number of parameters: not enough values for host variables.": 3. DELETE FROM INVADJ WHERE RefNo = :RefNo; 4. BEGIN DELETE FROM INVADJ WHERE RefNo = :RefNo; DELETE FROM INVADJD WHERE RefNo ...

Question about questions
Name: Edward Newill Email: ernewillatyahoodotcom Product: Thunderbird Summary: Question about questions Comments: Is there an email address that I can send a question too? I could not find one in the Service area of your site. I would like to know how I create signatures for my Thunderbird email? Best regards, E. Newill Browser Details: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727) From URL: http://hendrix.mozilla.org/ ...

To Delphi or not, that is the question...
For all those who cannot decide if they should move to Delphi or not: Tell your company's president that I will develop the product in Delphi for them on my dime, then we share in the profits from the product. Now you don't have to decide to Delphi or not. rich k wrote: > Tell your company's president that I will develop the product in > Delphi for them on my dime, then we share in the profits from the > product. Back in the early days, there was a long-time Pascal guy who, once he started using Delphi, would quote projects as "50% of the cost and 25%...

Delphi Question
Hi, I'm having no luck getting an answer from the Delphi newsgroups that I've posted this question to. So knowing that there are lots of smarty-pants here I thought that I'd give you a chance :-) I've installed Delphi 7 off a cover mount CD from Personal Computer World (January 2003 issue). I then downloaded the source for FeedReader from sourceforge.net. I then downloaded the FeedReader dependencies and I'm trying to compile and install them. However, EmbeddedWB116b requires vclie and I don't know what this is or where I get it. Any ideas? Regards, D...

Few questions about Delphi...
Can legacy Delphi code (Delphi 4, 5 etc) be developed using Delphi 2005? Which is the latest version of Delphi that supports legacy code? Thanks! <Karthik Kotha> wrote in message news:302424@forums.embarcadero.com... > Can legacy Delphi code (Delphi 4, 5 etc) be developed using Delphi 2005? > Which is the latest version of Delphi that supports legacy code? > > What do you mean by legacy code? All versions of Delphi compile the same old Object Pascal language. You can compile D4 code in Delphi 2007 with almost no change. With pro 2009 versions the only c...

Kerio and UDP question
I have a LAN with 3 PCs. PC1 is Win98Se with ICS and Kerio 2.1.5 and DSL. PC2 and PC3 are WinXP. "Running on internet gateway" is checked in Kerio. No special setups are made for ICS. PC2 can play counterstroke without any special rules in Kerio. My problem is that we (well..my sons..) can't play from PC3 without the rule to permit input UDP from CS server. They are connected to the same server, but not at the same time. The setup for PC2 and PC3 are identical as far as I can see. I assume that Kerio "understands" that when an UDP block is sent from a loca...

UDP broadcast
When I dial up to my ISP, services and controller app on my computer wants to send a UDP datagram to port 67 on 255.255.255.255, and then sometimes (but only sometimes) receives a UDP datagram back from ISP (port 68, or sometimes 53). Do I need this? Sometimes it seems to hamper my internet connection if I block it, sometimes not - but that could just be due to the vagaries of my ISP. ...

XP UDP broadcast
I am posting this problem and the solution to spread the news a little about a nasty bug in XP. PROBLEM I have a Perl (activestate) 5.8.8 script that uses IO::Socket::INET; and opens a broadcast UDP socket. The packets are received successfully by another host running a similar script as long as I run the sending script on windows2000. They fail to arrive when sent by the identical script running on an XP host. A packet sniffer shows that the packets are indeed broadcast but with an incorrect header checksum and therefore the receiving host rejects them at socket level. SOLUTION...

ZAP and UDP broadcasts...
Hi All, Using latest ZAP and "thought" I'd correctly configured the advanced settings to ALLOW local broadcasts from a 'lab server' (in house) to come thru on UDP 14000... but my alerts continue to show this as blocked??? Have i provided enough info for help? Someone know how else to configure this as I get about 40 alerts daily on this Novell network and i hate to look thru 'em for nothing. Thanks. -- Rich "Doc" Colley mailto: pc-doc@mediaone.net ...

Broadcast Concept question..
I have written a broadcast app from scratch, works perfect, but wondering if Im doing it propertly.. I have 500 clients that reside over the Internet. UDP is out of the question in this case. Each connects to my server, the server spawns a thread. The connection is maintained, via keep alive pings and a control loop. Each thread then Waits for an event to fire using a TEvent., to wake up etc. On my server, on the main thread, a user can push a button to send a message (Keeping it simple) When the button is pushed, the Global Tevent is fired , waking up the threads and the me...

Web resources about - UDP and broadcast question - embarcadero.delphi.winsock

Broadcast (band) - Wikipedia, the free encyclopedia
Broadcast are an indie electronic band, founded in Birmingham , England . Original members were Trish Keenan (vocals), Roj Stevens (keyboards), ...

Australian Rugby Union announces $285 million broadcast rights deal
The Australian Rugby Union (ARU) announced new and significantly improved media rights arrangements for 2016-2020 in Sydney on Thursday morning. ...

Cap City Becomes First Half Marathon In Ohio To Be Broadcast Live
Cap City Becomes First Half Marathon In Ohio To Be Broadcast Live 10TV President and General Manager of WBNS 10TV, John Cardenas says “10TV ...

November Reign: Fox Leads Broadcast with 25% C3 Growth
A few scheduling quirks helped shore up broadcast ratings in November, as a late finish to the 2015 Major League Baseball season and a Nielsen ...

Broadcast, Cable Networks Send Anchors to California
It was a travel night for some broadcast and cable news anchors, who flew cross country to be in place for the morning shows Thursday. CBS This ...

Broadcast from San Bernardino Home Provokes Shock - Al Jazeera America
Crime scene was cleared by FBI, but unedited images of personal effects have many questioning media's judgment

MSNBC apologizes after live broadcast from home - Chicago Tribune
In the smaller of the two bedrooms, a white crib was piled with baby blankets and toys. Stuffed animals filled a laundry basket. A white bear ...

Les Moonves: Broadcast TV Doing Fine Even With No “Grand Slam Home Runs”
The current TV season represents “a tipping point” for broadcasters with “no grand slam home runs out of the box” — but little to worry about ...

Can News Corp's Broadcast Deal With NRL Impact Its Valuation?
... will pay around $730 million. We expect this deal to improve News Corp's subscription revenues, however the high cost of acquiring these broadcasting ...

UK Weather Forecaster Packs 12 Star Wars Puns Into 40-Second Broadcast
This is a video of UK Channel 5 weather forecaster Sian Welby presenting a short 40-second weather report in which she manages to packs twelve ...

Resources last updated: 12/24/2015 1:02:16 PM