Returns the current session number for this instance.
Session numbers are assigned by the universe server to uniquely identify an Active Worlds login session. Certain events, such as network communication failures, can cause new session numbers to be assigned on the fly to an existing instance.
Several API events use session numbers to uniquely identify other Active Worlds users.
/* print a message whenever the session number changes */
int session = aw_session ();
for (;;) {
if (session != aw_session ()) {
session = aw_session ();
printf ("New session number: %d\n", session);
}
aw_wait (1000);
}
AW_EVENT_AVATAR_ADD
AW_EVENT_AVATAR_CHANGE
AW_EVENT_AVATAR_DELETE
AW_EVENT_CHAT
AW_EVENT_OBJECT_ADD
AW_EVENT_OBJECT_DELETE