home *** CD-ROM | disk | FTP | other *** search
- #pragma once
- /*****
- *
- * TCPUtil.h
- *
- * This is a support file for "Grant's CGI Framework".
- * Please see the license agreement that accompanies the distribution package
- * for licensing details.
- *
- * Copyright ©1996 by Grant Neufeld
- * grant@acm.com
- * http://arpp.carleton.ca/cgi/framework/
- *
- *****/
-
- #include "MyConfiguration.h"
- #if kCompileWithTCPCode
-
- #if kCompilingForWSAPI
- #include <WSAPI.h>
- #endif
-
- #include "CGI.h"
-
-
- /*** CONSTANTS ***/
-
- /** TCP/IP conection status codes **/
-
- typedef enum {
- #ifndef WSAPI_ConnectionStatus
- TCPStatus_Closed = 0, /* not connected */
- TCPStatus_Open = 1, /* connected */
- TCPStatus_Data = 2, /* data is available to read */
- TCPStatus_Unknown = 3 /* error state */
- #else
- TCPStatus_Closed = WSAPI_IP_Closed,
- TCPStatus_Open = WSAPI_IP_Open,
- TCPStatus_Data = WSAPI_IP_Data,
- TCPStatus_Unknown = WSAPI_IP_Unknown
- #endif
- } TCPStreamStatus;
-
-
- /*** FUNCTION PROTOTYPES ***/
-
- p_export SInt32 TCPOpenClientStream ( CGIHdl, UInt32, UInt16 );
- p_export SInt32 TCPCloseClientStream ( CGIHdl, UInt32, UInt16 );
- p_export SInt32 TCPReadFromClientStream ( CGIHdl, void *, UInt32 * );
- p_export SInt32 TCPWriteToClientStream ( CGIHdl, void *, UInt32 );
- p_export SInt32 TCPClientStreamStatus ( CGIHdl, UInt32, TCPStreamStatus *, UInt32 * );
- p_export SInt32 TCPNameToIPAddress ( CGIHdl, char *, UInt32 * );
-
-
- #endif /* kCompileWithTCPCode */
- /***** EOF *****/
-