Magic Internet Kit

Magic Internet Kit
Programmer's Guide


Introduction


Real connectivity made real easy

The Magic Internet Kit is a complete development kit for creating Magic Cap applications that communicate in a variety of ways. The heart of the Magic Internet Kit is a powerful yet easy-to-use object framework that provides:

From the first steps of creating a communicating application to maintaining the code later, the Magic Internet Kit makes your work easy and your development cycle fast. From the very beginning, you can use MIK's automated package creation helper tool to create an application with exactly the functionality that you want.

In addition to being able to pick and choose the functionality for your new application, you can also use one of several templates provided with MIK to get you started right where you want to be. These templates range from an "empty" package with no user interface to a ready-to-go terminal package.

While the handy package creation tools help you get started quickly, the real power of the Magic Internet Kit lies in its robust and flexible programming interfaces. This framework is arranged to provide you with a single set of methods that you can call to create any type of communications stream you want.

Figure 1 Magic Internet Kit layout

Any of the blocks in the above figure below the API can be dropped out or replaced with no effects on other blocks beside it. For example, if your application does not need serial modem or MagicBus support, these components can be left out with no adverse effects on TCP/IP. Thanks to this modular design, the Kit's framework is easily updateable when new modules are developed or current ones are enhanced. Additionally, all of the Internet Kit, with the exception of the low-level TCP/IP parts, is provided as fully documented and commented source code, so you can modify it if your application requires it.

What you should already know

The Magic Internet Kit Programmer's Guide assumes that you are familiar with the basics of TCP/IP and related protocols. If you need an introduction, we recommend you read Internetworking with TCP/IP by Douglas Comer or TCP Illustrated by Richard Stevens. If you don't want to write TCP/IP applications, then you don't need to worry; the Magic Internet Kit also works directly using the modem or serial port.

This document also assumes that you are somewhat familiar with Magic Cap development. If you need to find out more about the basics of writing a Magic Cap application, see Barry Boone's Magic Cap Programmer's Cookbook. The Cookbook steps you through the Magic Cap concepts that you need to know. Additionally, you can locate more information from General Magic's Magic Cap Development Overview web page located at:

http://www.genmagic.com/Develop/MagicCap/Overview/index.html

One specific aspect of writing a Magic Cap application, exception handling, is also very important for using the Kit. For more information on how to use exceptions, read the "Handling Exceptions" chapter of Magic Cap Concepts. Don't worry if you are new to exceptions; the code snippets and templates provided with the Magic Internet Kit illustrate how to write the handlers you need. The online version of Magic Cap Concepts is located at:

http://www.genmagic.com/Develop/MagicCap/Docs/Concepts/index.html

About this document

The Magic Internet Kit Programmer's Guide documents the Kit from the high-level APIs to the low-level device drivers. The Guide starts with a discussion of the automated tools and templates available for creating a package, and then proceeds on to discussing the high-level APIs for communications work. Later chapters dive into detail about TCP/IP and multithreaded communications functionality. This document also includes a reference section for all of the communications classes that are included in the Magic Internet Kit.


Note: This document is constantly evolving, but our web site will always have the latest version. As of this writing, the Reference section is not yet completed, and the "In Depth" chapters still have room to grow. Be sure to check our web site for the latest copy of the Guide at:

http://www.genmagic.com/Develop/MagicCap/Internet/index.html



Magic Internet Kit home page Programmer's Guide index