Two way channel roles?

Andy Dent <[email protected]> Mon, 20 Jan 2003 17:08:40 +0800
Newsgroups gmane.network.beep.beepcore.c.general
Message-ID <a05111701ba5167f749f5@[203.23.218.231]>
I'm a bit confused and hope someone doesn't mind clarifying these roles.

I have two situations where messages flow in two directions.

The first is where application settings are remotely configured - the
client connects to the server, creates a Settings Channel and will send new
Settings periodically, as the user changes the UI.

However, Settings can also be changed locally on the server, which will
then send them back to the client.

Should this be two channels or one?

Similarly, Triggers are established by sending a TriggerRequest to the
server, which will then send back a TriggerEvent every time data
(brainwaves) matches the trigger parameters.

The client can send new TriggerRequests (or CancelTrigger messages)
periodically but, once set, the bulk of the data flow will be in the
opposite direction.

I *think* these are two profiles, each running over one channel. The
Initiator vs Listener roles are clear in terms of who initiates the
channel. I just get a little lost sometimes thinking of the sequencing of
messages.

This is where the lack of really detailed examples has confused me when we
get into race territory.

Take the example of the Triggers, say a client sends back a CancelTrigger
after a Trigger has been running for a while - are both the following
valid, which is what I've assumed?


I:	MSG 1 TriggerRequest
L:	RPY 1 ok
L:	MSG 1 TriggerEvent
I:	RPY 1 ok
...
L:	MSG 1 TriggerEvent
I:	MSG 4 CancelTrigger     // cancel sent before processing the
TriggerEvent
L:	RPY 4 ok
I:	RPY 1 ok

OR
L:	MSG 1 TriggerEvent
I:	MSG 4 CancelTrigger     // cancel sent before processing the
TriggerEvent
I:	RPY 1 ok
L:	RPY 4 ok  // Listener has received the MSG and RPY before having
time to send the RPY


thanks
-- 

Andy Dent BSc  MACS  AACM   http://www.oofile.com.au/
OOFILE - Database, Reports, Graphs, GUI for c++ on Mac, Unix & Windows
PP2MFC - PowerPlant->MFC portability


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en