home *** CD-ROM | disk | FTP | other *** search
/ VRML Tools for 3D Cyberspace / VRML_Tools_For_3D_Cyberspace.iso / amber / include / sockproc.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-01  |  1.1 KB  |  50 lines

  1. //**********************************************************************
  2. //  DIVE Laboratories, Inc.
  3. //  Copyright(c) 1995
  4. //  All rights reserved.
  5. //  FILE:   sockproc.hpp
  6. //
  7. //  DESCRIPTION
  8. //  This file provides a socket procedure style class that will run a 
  9. //  style that provides recv and xmit communication by calling the functions
  10. //  provided by the user.
  11. //
  12. //  M Doucet
  13. //
  14. //  Modification History:
  15. //  6/22/95     Created
  16. //
  17. //**********************************************************************
  18. #include "style.hpp"
  19. #ifdef WIN32
  20. #include "winsock.hpp"
  21. #endif
  22. #ifdef INDIGO2
  23. #include "sgisock.hpp"
  24. #endif
  25. #include "channel.hpp"
  26.  
  27. typedef  void   (*RECVFUNCPTR)(dataMsgClass *msg, int from);
  28. typedef  void   (*XMTFUNCPTR)(void);
  29.  
  30. class messageProcClass : public styleClass {
  31.  
  32. private:
  33.  
  34.     socketClass *s;
  35.     channelClass *ch;
  36.     RECVFUNCPTR  recv;
  37.     XMTFUNCPTR   xmit;
  38.  
  39. public:
  40.  
  41.     void style(void);
  42.  
  43.     messageProcClass(socketClass *socket, 
  44.                           channelClass *channel,
  45.                           RECVFUNCPTR receiveFunction,
  46.                           XMTFUNCPTR  transmitFunction,
  47.                      int rate=5);
  48.     ~messageProcClass();    
  49. };
  50.