BONE - Bot Network
The Bone System is a simple datagram dispatching system, based on a client server model. ImaBot hosts the Bone server, and all clients connect to it are identified by a user name. Any connected party can send Bone datagrams to any other party just by addressing them to the desired target name.
Bone was originally created to provide an independent network link for bots programmed for Active Worlds, but the Bone system itself is not related to AW in anyway (except for some SDK similarities).
A Bone program uses the bone.dll to communicate with the server. It issues requests by calling bone.dll API functions, and it gets results from the server by processing the Callback functions issued by bone.dll.
Bone communication is completely asynchronous. Each Bone function returns immediately, and any result must be retrieved by installing a callback for that particular event.
One of the goals of Bone was to make network communication simple. No need for name resolution, I.P. negotiation or similar. All you need is a target user name and you can communicate.
Release 1 of Bone resembled this "easy" approach. It had only the create, login, sendtext and destroy functions, and it used only a login, text and a disconnect callback. 4 functions and 3 callbacks. Today, it has been expanded to include user creation, contact lists, and advanced channels, among other features. However, the simplicity of the API still remains.
Note that Bone was designed for Windows applications. Such applications usually have some GUI, which means they open a window on the screen, and therefore they use the Windows event driven approach called a "Windows Message Loop". This message loop is required and it consists of a call to GetMessage(), TranslateMessage and DispatchMessage(). These 3 functions calls are standard WIN32 API calls. The only Windows application type that does not use this message loop is Console applications.
Bone, however, relies on this technique to have its network communications running in the background properly, and for this reason, console Bone applications must add the GetMessage() loop to their programs as shown in the first example. For an example of this, see the Sample Programs. Any other application that opens a window does already carry a message loop, either plain visible in its main() or winmain() function, or for example hidden by the MFC (Microsoft Foundation Classes) framework.
Expect the Bone API to become richer in the future as new feature are added. The possibilities are limitless.