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.
const.h
/* |
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. |
*/ |
#include <MacTCPCommonTypes.h> |
#include <TCPPB.h> |
#define kSleepTime 30 |
#define kNumConnections 10 |
#define kNumBuffers kNumConnections |
#define kMainDialog 128 |
#define kQuitItem 1 |
#define kGreetingItem 2 |
#define kServicedItem 3 |
#define kFreeItem 4 |
#define kRunningItem 5 |
#define kCompletedItem 6 |
#define kRcvBuffSize 8192 |
#define kGreetingPort 1235 |
typedef struct MyQElem { |
TCPiopb tcpBlock; |
long savedA5; |
} MyQElem, *MyQElemPtr; |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14