[comp.windows.x] Looking for InterClient Messages Examples

pkenny@ADS.COM (Patrick Kenny) (01/30/91)

I would like to send an Interclient Message from one client to another,
are there any example programs that anybody knows of that I can take a
look at?

Any help would be great!

Thanks
-pk

--
Patrick Kenny |  pkenny@ads.com
-------------------------------
Life, the Universe and Computers .. what more is there?  

gjw@spurr.wr.usgs.GOV (Gregory J. Woodhouse) (01/31/91)

>From xpert-mailer@expo.lcs.mit.edu Tue Jan 29 23:59:35 1991
>Return-Path: <xpert-mailer@expo.lcs.mit.edu>
>Received: from expo.lcs.mit.edu ([18.30.0.212]) by spurr.wr.usgs.gov (4.1/SMI-4.1)
>	id AA02853; Tue, 29 Jan 91 23:59:32 PST
>Received: by expo.lcs.mit.edu; Tue, 29 Jan 91 20:29:05 EST
>Received: from bloom-beacon.MIT.EDU by expo.lcs.mit.edu; Tue, 29 Jan 91 20:29:00 EST
>Received:  by bloom-beacon.MIT.EDU (5.61/25-eef)
>	id AA17066; Tue, 29 Jan 91 20:25:00 EST
>Received: from USENET by bloom-beacon.mit.edu with netnews
>	for xpert@expo.lcs.mit.edu (xpert@expo.lcs.mit.edu)
>	(contact usenet@bloom-beacon.mit.edu if you have questions)
>Date: 30 Jan 91 01:09:40 GMT
>From: pkenny@ads.com (Patrick Kenny)
>Organization: Advanced Decision Systems, Mt. View, CA (415) 960-7300
>Subject: Looking for InterClient Messages Examples
>Message-Id: <'+!&MB-@ads.com>
>Newsgroups: comp.windows.x
>Sender: xpert-request@expo.lcs.mit.edu
>To: xpert@expo.lcs.mit.edu
>Status: R
>
>I would like to send an Interclient Message from one client to another,
>are there any example programs that anybody knows of that I can take a
>look at?
>
>Any help would be great!
>
>Thanks
>-pk
>
>--
>Patrick Kenny |  pkenny@ads.com
>-------------------------------
>Life, the Universe and Computers .. what more is there?  
>

What sort of messages do you want to send?  Far and away the easiest thing to
do is use XSendEvent to send a special event called a ClientMessage which
can store 20 bytes of data.  If this isn't adequate, you have two choices
(at least), you can use the selection mechanism or you can use a socket.
Selections allow you to store fairly large amounts of data in the server and
then requet that another application fetch them.  The final option (which I
don't recommend) is to set up a seperate socket and use select().  A lot of
the recent traffic on this list has shown hows tricky that can be.  Anyway,
let me know what you're looking for and I'll send you some sample code.

Gregory Woodhouse
gjw@ags.wr.usgs.gov