Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
globals.c
/* |
TCP Client/Server Queuing Example |
Steve Falkenburg, MacDTS, Apple Computer |
3/11/92 |
this client/server sample uses MacTCP to implement a simple "greeting" server. the server |
opens up several listeners on kGreetingPort (1235). when a client connects, the data entered |
in the greeting dialog is sent to the remote connection, and the connection is closed. |
connection management is done through the use of Operating System queues to simplify tracking |
and usage. |
*/ |
#ifndef __PROCESSES__ |
#include <Processes.h> |
#endif |
Boolean gDone = false; // set to true when user clicks quit |
short gTcpDrvrRef; // MacTCP (.ipp driver) driver reference number |
DialogPtr gMainDialog; // pointer to main window |
short gFree,gRunning,gCompleted; // queue counters indicating number of blocks in each q. |
long gServiced; // counter indicating how many clients have been served |
Boolean gRunningSeven; // true if we're running System 7 |
ProcessSerialNumber gOurPSN; // process serial number for use in WakeUpProcess() |
Str255 gGreetingData; // greeting string sent to client |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14