home *** CD-ROM | disk | FTP | other *** search
- //**********************************************************************
- // DIVE Laboratories, Inc.
- // Copyright(c) 1995
- // All rights reserved.
- // FILE: sockproc.hpp
- //
- // DESCRIPTION
- // This file provides a socket procedure style class that will run a
- // style that provides recv and xmit communication by calling the functions
- // provided by the user.
- //
- // M Doucet
- //
- // Modification History:
- // 6/22/95 Created
- //
- //**********************************************************************
- #include "style.hpp"
- #ifdef WIN32
- #include "winsock.hpp"
- #endif
- #ifdef INDIGO2
- #include "sgisock.hpp"
- #endif
- #include "channel.hpp"
-
- typedef void (*RECVFUNCPTR)(dataMsgClass *msg, int from);
- typedef void (*XMTFUNCPTR)(void);
-
- class messageProcClass : public styleClass {
-
- private:
-
- socketClass *s;
- channelClass *ch;
- RECVFUNCPTR recv;
- XMTFUNCPTR xmit;
-
- public:
-
- void style(void);
-
- messageProcClass(socketClass *socket,
- channelClass *channel,
- RECVFUNCPTR receiveFunction,
- XMTFUNCPTR transmitFunction,
- int rate=5);
- ~messageProcClass();
- };
-