AW SDK for Linux
The SDK now officially supported by ActiveWorlds, Inc. Look for the current versions at the official download page
Finally - we have an SDK for the AW technology under *nix :)
The tar files contains the static library versions and
the corresponding aw.h file (tho that is identical to the one comes
with the windows version)
I created two distinct versions due to the differences between Linux and FreeBSD:
SDK build 41: Linux FreeBSD
- fixed return code in aw_world_ejection_lookup()
- added length checking for the aw_url_send() parameters.
- added several buffer overflow checking to harden the code against attacks
SDK build 40:
- changed aw_data_set() and aw_data() length variable type. It is used to be
unsigned char for length - now it is unsigned int. The maximum size of
the data is still 255 bytes!
- fixed return error code if the universe/world host can not be resolved to RC_CANT_RESOLVE_UNIVERSE_HOST
beta 2 has a cosmetic fix. The tarball includes a sample bot.
Linux build 40
I omitted the shared library version because it can cause problems.
This is SDK build 39, beta version 3. Check back regularly to see if any new version / fix is available.
Linux (tested on Mandrake 8, 10, Suse 7, RedHat 7,8,9 , Enterprise 3, Gentoo )
FreeBSD (5.2.1, several 4.x)
Please report any problems to: andras curly-character andras dot net
There are two Pascal examples, one is for FreePascal under Linux and the other one is for Dev-Pascal under Windows. Thanks goes to Stachel Banane who ported the aw.h for Pascal!
Interesting observation (no answer but workaround:)
- Under Mandrake 10.0 each SDK call is slowed down to 1
sec/response. Adding your own timer, it responds immediately even if
you are not using the timer:
#include <sys/time.h>
#include <signal.h>
#include <unistd.h>
void Timer_Action(int param)
{
;
};
static struct sigaction MyAction;
static struct itimerval TimValue;
void init_timer()
{
MyAction.sa_handler=Timer_Action;
sigaction(SIGALRM,&MyAction,NULL);
TimValue.it_interval.tv_sec=0;
TimValue.it_interval.tv_usec=20000;
TimValue.it_value.tv_sec=0;
TimValue.it_value.tv_usec=20000;
setitimer(ITIMER_REAL,&TimValue,NULL);
};
and call the init_timer() within your code once after you created the bot instance.
Simple Greeter bot example is here
Credits:
Thanks to all who helped.
Special thanks to:
Tony M, SleepyE, TheMask for providing access to their computers and helping the debug procedure.
Active Worlds Inc, for let me do it :)
Accessed since June 18. 2004:
