Future Lab - Source Only Socloc Package for C/C++ Users Journal

This package contains the full source code and documentation for the September 2000 article in C/C++ Users Journal titled A TCP/IP Socket Location Server. This version is designated 1.24-2000.07.05 which is a package version. The change log will completely describe the new or changed material. Each application also has its own version.

This package contains all necessary modules to compile socloc and all applications mentioned in the article. In order to maintain the integrity of the HTML links, the included documentation covers all current Future Lab GPL software.

System Requirements

You must have enough disk space for the decompressed contents of this package which is about 950.95KB currently. Since all of the enclosed software is extremely compact and not at all bloated, the memory requirements are minimal.

To compile this GPL code, you will need a full ANSI C complaint compiler for the chosen OS. You will also need the Berkeley socket API and library (under Unix) or the Winsock (minimum version 1.1) API and library (under Windows 32bit). Before you attempt to compile the code, make sure you understand the code structure and the module dependencies.

At runtime, you will need an installed and functioning TCP/IP protocol stack.

Decompressing the Package

This source only version is distributed in WinZip form.

All files in this package use the 8.3 naming convention except for the HTML documentation which uses the '.html' extension (for compatibility with Unix).

To decompress the package:

Package Structure

This package contains all the source code and documentation. The directory structure of the package is as follows:

Compiling the Source Code

In order to compile the source code included in this package, you will need to have an ANSI C compiler installed. The method that you use to compile these GPL applications will depend on whether the compiler is based on an IDE or command line.

Setup for an IDE Compiler

Create a top level directory that will contain all the socloc directories. Underneath this top level directory, create the following subdirectories:

Loading the IDE Compiler Tree

This section will discuss how to load each of the IDE directories.

clib

Copy the package library directory code\clib into this directory.

dumsockc

Create a C console application project in this directory and then copy the package file code\apps\dumsockc.c into this directory as main.c.

dumsocks

Create a C console application project in this directory and then copy the package file code\apps\dumsocks.c into this directory as main.c.

include

Copy the package include directory code\include into this directory.

sloc

Create a C console application project in this directory and then copy the package file code\apps\socloc.c into this directory as main.c.

socloc

Copy the package library directory code\socloc into this directory.

Setup for a Command Line Compiler

When using a command line compiler, you can use the package directory tree as is. When creating scripts or make files to compile, keep the following items in mind:

Other Project Details

Edit the main include file stdhead.h and make sure the correct platform is selected via the appropriate define. Also make sure the define MULTIUSER is not defined in this header file if you are passing this definition from the compiler.

Running the Applications, A Quick Start

All of the applications are text console-based. Many of the applications have one or more configuration files that need to be read. You should execute all of the Future Lab GPL applications from within the same directory where they are stored. You should also store all configuration files within this same directory. Here is a list of all Future Lab GPL applications and their runtime requirements:

dumsockc

This is the multi user client socket application that interfaces with the dumsocks server. This application requires at least one socloc server to be running and needs to be executed in a directory that also contains the socloc startup file. Refer to the dumsockc application doc for more information.

dumsocks

This application is a dumb socket server which accepts a very limited number of commands. The server is intended to be used for testing along with the dumsockc client application. This application requires at least one socloc server to be running and needs to be executed in a directory that also contains the socloc startup file. Refer to the dumsocks application doc for more information.

socloc

This socket server application serves as an information depot for all other socket servers. Socket client applications can connect to socket servers by obtaining server details from a socloc server. Multiple socloc servers can be running to provide redundancy. Multiple socket servers of the same type (identified by service name) can also be running. The socloc APIs provide automatic fail over protection for client applications interfacing with socloc servers. Automatic fail over protection is easy to accomplish with socket servers.

Documentation Guide

Here is a complete guide to the included package documentation. Note that I have tried to make sure that most links function properly. You will find that all links that refer to the Future Lab GPL software function. Links that refer to other parts of the Future Lab web site will not function properly from this readme file. In that case, please refer to the actual Future Lab web site.