home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / BlueBox Spy / Blue Box Daemon / source / CUDPServerThread.h < prev    next >
Encoding:
Text File  |  1998-08-06  |  1.3 KB  |  49 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. //    CUDPServerThread.h            ©1995-1998 Metrowerks Inc. All rights reserved.
  3. // ===========================================================================
  4.  
  5. #pragma once
  6.  
  7. #include <LThread.h>
  8.  
  9. #include <LUDPEndpoint.h>
  10.  
  11. #include "CSimpleUDPServer.h"
  12. #include "CTerminalPane.h"
  13.  
  14. class CSimpleUDPServer;
  15.  
  16. // ===========================================================================
  17. //        • CUDPServerThread
  18. // ===========================================================================
  19. //    The thread that actually does the work of the server responder.
  20. //    Note that typed characters (i.e. data sent to the remote host
  21. //    are NOT handled by this object.) Only incoming data are processed
  22. //    here.
  23.  
  24. class CUDPServerThread :    public PP_PowerPlant::LThread {
  25.  
  26. public:
  27.                         CUDPServerThread(
  28.                                 UInt16                inLocalPort,
  29.                                 PP_PowerPlant::LUDPEndpoint*        inNetworkEndpoint,
  30.                                 CSimpleUDPServer*    inServerMaster,
  31.                                 CTerminalPane*        inTerminalPane);
  32.     virtual                ~CUDPServerThread();
  33.     
  34.     void                Complete();
  35.     
  36. protected:
  37.     bool                mContinue;
  38.     
  39.     virtual void*        Run();
  40.  
  41.     PP_PowerPlant::LUDPEndpoint*        mEndpoint;
  42.     CSimpleUDPServer*                    mServerMaster;
  43.     UInt16                                mMaxConnections;
  44.     UInt16                                mPort;
  45.     CTerminalPane*                        mTerminalPane;
  46.     
  47.     friend class CSimpleUDPServer;
  48. };
  49.