home *** CD-ROM | disk | FTP | other *** search
/ Mac Expert 1995 Winter / Mac Expert - Winter 95.iso / Les fichiers / Communications / Internet / TurboTCP 2.1 ƒ / TurboTCP core / TCPCompletionProc.cp < prev    next >
Encoding:
Text File  |  1995-01-04  |  1.4 KB  |  49 lines  |  [TEXT/MMCC]

  1. //
  2. // TCPCompletionProc.cp
  3. //
  4. //    TurboTCP library
  5. //    TCP asynchronous call completion procedure
  6. //    68K code resource for PowerPC applications
  7. //
  8. //    Copyright © 1993-95, FrostByte Design / Eric Scouten
  9. //
  10.  
  11. // •• THIS FILE SHOULD NOT BE INCLUDED IN PowerPC BUILDS! •• 
  12.  
  13. #include "TurboTCP.buildflags.h"
  14. #include "TurboTCP.types.h"
  15.  
  16. #ifndef __MWERKS__
  17.     //#pragma options(!force_frame, !profile)
  18. #else
  19.     #pragma profile off
  20.     #pragma a6frames off
  21. #endif
  22.  
  23. #if TurboTCP_PPC
  24.     #error Do not include this file in PowerPC builds!
  25. #endif
  26.  
  27.  
  28. //***********************************************************
  29.  
  30. #pragma parameter main(__A0)
  31. void main(struct TurboTCPiopb* iopb)
  32.  
  33. // The asynchronous completion routine. Recieves notification that any asynchronous
  34. // TCP I/O operation has been completed. This routine is used for all TCP calls placed by
  35. // CTCPAsyncCall::DoAsyncCall.
  36. //
  37. // Send notification to the TCP driver object that this call has been completed. The driver
  38. // then queues the call for processing at the next event loop.
  39. //
  40. // The struct TurboTCPiopb includes a pointer to the CTCPDriver queue so that we don’t
  41. // need to access application globals in this loop. This improves performance, and
  42. // also permits us to use a 68K code resource in an otherwise PowerPC environment
  43. // to avoid the performance hit of mode switches.
  44.  
  45. {
  46.     ::Enqueue((QElemPtr) &(iopb->itsQElem), iopb->itsQueue);
  47.             // CTCPDriver::ProcessNetEvents will pick this up later
  48. }
  49.