Thread

Event Subscriptions ... Where's the filter? (Sdk)

Event Subscriptions ... Where's the filter? // Sdk

1  |  

grimble

Nov 22, 2002, 5:03pm
Another quickie ... probably to a bot developer with a world server.

Can anyone tell me where the filtering of events is made - i.e. does the
world server only send those events explicitly subscribed to or do all
events get received by the SDK and filtered accordingly depending on whether
the event has been subscribed to?

Essentially, what I need to know is whether subscribing to all events
actually impacts the amount of information transmitted across the net to the
instance of the SDK.

Thanks,

Grims.

joeman

Nov 22, 2002, 8:10pm
The SDK sends an event mask to the world server when connected, the world
server in turn only sends the events that the mask specifies.

-Joe

[View Quote]

grimble

Nov 22, 2002, 8:12pm
Thanks Joe.

Grims

[View Quote]

strike rapier

Nov 23, 2002, 9:16am
Maybe I could just throw in a question here? Does this mask get sent to the server every time you use AW_EVENT_SET or AW_EVENT_UNSER, or when connecting to the world?

- Mark
[View Quote]

joeman

Nov 23, 2002, 3:45pm
When you set events, the mask is generated, and when you connect to the
world server, the mask is sent... That's why if one tries to set events
during an open connection to the world server, they will not trigger.

-Joe

[View Quote]

strike rapier

Nov 23, 2002, 4:11pm
mwhahaha, whoops. Thankya Joe, lol

- Mark
[View Quote]

grimble

Nov 23, 2002, 8:31pm
Can you define "an open connection to the world server" for me please?? Does
this mean on aw_enter() because I have no problems setting up and receiving
new events while "in" a world (with SDK build 27).

Grims

[View Quote]

baron

Nov 23, 2002, 9:07pm
Same in build 24, events and callbacks can be set and unset on the fly at any time. This most likely means the mask is sent by the SDK 'on mask change' and not just 'on instance connect' which is a subtotal of 'on mask change' anyway.

-Baron


[View Quote]

joeman

Nov 23, 2002, 11:22pm
Nah :). You're forgetting that you cant change events on the fly. When you
set an event, it doesn't matter if you change it to another handler, its
still set. Also, if you set it to NULL, the sdk will still get it, but not
pass the data on to anything else. So, lets say you have 3 events set, then
if one event triggers, it sets 2 other new events. 3 events are set when it
connects, correct? Wrong, all five are sent in the mask.

-Joe

[View Quote]

grimble

Nov 24, 2002, 9:49pm
I still don't understand you're concept of an "open connection". If I have
the following, everything works perfectly logically ...

aw_create
aw_event_set(<event 1>, <handler1>)
aw_event_set(<event 2>, <handler2>)
aw_event_set(<event 3>, <handler3>)
aw_login
aw_enter
..
..
(some time later)
aw_event_set(<event 4>, <handler4>)
aw_event_set(<event 5>, <handler5>)

Events 4 and 5 will fire after the appropriate aw_event_set. If a persisted
connection to the world server is established on aw_enter, then by your
reckoning (one mask only, sent at connection time) events 4 and 5 should not
be received by the client application, whereas in fact they are. Events 4 &
5 are "not set" as far as the SDK is concerned until some point later in the
app after entering the world ... OR are you saying that a short-term session
is established and terminated with each aw_wait call (and the mask is
transmitted each time in a kind of "give me these this time" fashion)??

*a tad confused now* ;O)

Grims


[View Quote]

joeman

Nov 24, 2002, 10:45pm
Nah, you're forgetting that the program can look ahead into itself, and
check what events are set, whenever. The SDK would send a mask for all five
of the events.

-Joe

[View Quote]

milesteg

Nov 24, 2002, 10:52pm
AHAHAHAHAHAHAHHAHAHAHAHA
i love that one :)))))))))

MilesTeg


"joeman" <joeman at bootdown.com> a écrit dans le message de news:
3de172ac$1 at server1.Activeworlds.com...
> Nah, you're forgetting that the program can look ahead into itself, and
> check what events are set, whenever. The SDK would send a mask for all
five
> of the events.
>
> -Joe
>
[View Quote]

joeman

Nov 25, 2002, 12:02am
Isn't it time to take your medication now? Remember to take all five of
them.

-Joe

[View Quote]

mrgrimm

Nov 25, 2002, 12:03am
The mask it sent when you connect (aw_enter, after a disconnect, etc) and
after calling aw_event_set.

With aw_event_set the mask it not sent immediately. You must first call
aw_wait or any function that has an associated callback (ie: aw_query, not
aw_say). The callback does not have to be set.

-Grimm

[View Quote]

joeman

Nov 25, 2002, 12:09am
Gah, I feel silly now. Just looked through the protocol documentation.
Setting an event mask is its own packet. I saw somewhere, where it was sent
with the login packet, but, I was wrong. Its sent right after the login
packet, along with a state change packet. The browser only sends one mask
setting packet (0x018f), to receive all events, so that's all I've delt
with.

-Joe
*hides in cave*

[View Quote]

chazrad

Nov 25, 2002, 1:09pm
what i noticed it also suffices to set the events twice. I set them before
entering and directly after entering.

works for me


"mrgrimm" <will at activeworlds.com> wrote in
news:3de184e6 at server1.Activeworlds.com:

> The mask it sent when you connect (aw_enter, after a disconnect, etc)
> and after calling aw_event_set.
>
> With aw_event_set the mask it not sent immediately. You must first
> call aw_wait or any function that has an associated callback (ie:
> aw_query, not aw_say). The callback does not have to be set.
>
> -Grimm
>

1  |  
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2022. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn