Article View: borland.public.cppbuilder.nativeapi
Article #11559Re: How can my app talk to other instances, networked and local?
From: Bob Gonder
Date: Thu, 05 Feb 2004 03:23
Date: Thu, 05 Feb 2004 03:23
28 lines
2363 bytes
2363 bytes
Remy Lebeau (TeamB) wrote: >"Hans Galema" <dontusethis@dontusethis.nl> wrote in message >news:4020d650$1@newsgroups.borland.com... > >> UDP would be easy to implement. It can broadcast and so >> no application has to know about other applications. Also >> if your application would eventuallu run on WAN you would >> not have to change to much. In looking, was reminded of mailslot, so took another look at some old code I had done a couple years back, and got that working, but it only talks to one instance per user (any instance can talk, but only the first can listen). So I probably need to get on with UDP. >The thing about UDP is that it doesn't pass through network routers very >well. You wouldn't be able to send a UDP broadcast to the entire >network,only your particular subnet of it. You mean the 255.255.255.0 subnet? I think that would be acceptable. I've googled, but haven't come up yet with example code or APIs for UDP. Just see mention that I need a port number, and the list of pre-assigned ports is mind numbing. Ok, I see I need Sockets. Gotten as far as UDPsocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); Still reading on MSDN, but getting tired. More later.
Technical Details
Message-ID:
<2f63205sghfq244hhc2obsdnk25jn6852r@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<jeh0201cn87itns31e9776ge0s7l7gkqe6@4ax.com> <4020d650$1@newsgroups.borland.com> <40213288$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d12e7cf0a85501e9 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-04 19:24:50 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How can my app talk to other instances, networked and local? Date: Wed, 04 Feb 2004 19:23:49 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <2f63205sghfq244hhc2obsdnk25jn6852r@4ax.com> References: <jeh0201cn87itns31e9776ge0s7l7gkqe6@4ax.com> <4020d650$1@newsgroups.borland.com> <40213288$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.177.80 X-Trace: newsgroups.borland.com 1075951430 67.31.177.80 (4 Feb 2004 19:23:50 -0800) Lines: 32 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!news-xfer1.atl.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail