home *** CD-ROM | disk | FTP | other *** search
/ Dream 57 / Amiga_Dream_57.iso / Amiga / Programmation / e / Modules / AmiTCP_beta.readme < prev    next >
Encoding:
Text File  |  1998-09-25  |  2.2 KB  |  63 lines

  1. Short:  Beta AmiTCP mods for Amiga E
  2. Author: jason@fsel.com (Jason R. Hulance)
  3. Type:   dev/e
  4.  
  5. AmiTCP modules for Amiga E
  6. ==========================
  7.  
  8. This is pretty much a beta release of these modules, since I've had no
  9. bug reports on the last version (which was some time ago).  I'm still
  10. in the rather poor position of not actually running AmiTCP myself, so
  11. I am reliant on those who are...
  12.  
  13. The sources are included but, as ever, they are just for reference.
  14. In particular, you shouldn't try compiling the sources as some of the
  15. modules have had to be fiddled with to get unions etc. (and this will
  16. affect not just the module with the fiddle in it, but all those that
  17. use it).
  18.  
  19. The big difference over the last version is that one of the bitfield
  20. operations has been corrected (Wouter's documentation mislead me, but
  21. there's no real excuse for me not testing that bit!), and there is now
  22. some initialisation code.  This was present in the net.lib link
  23. library of the SAS/C version, so I guess it might be pretty important.
  24. The rest of net.lib has not yet been ported to E (unless someone knows
  25. different...).  I may start working on it but, again, I'm hardly the
  26. best person to do this, not having AmiTCP running on my Amiga!
  27.  
  28. To use the initialisation do something like this:
  29.  
  30.   MODULE 'amitcp/init/amitcp_init'
  31.  
  32.   PROC main() HANDLE
  33.     -> AmiTCP: initialise everything
  34.     amitcp_init()
  35.  
  36.     -> Your code
  37.  
  38.   EXCEPT DO
  39.  
  40.     -> Your cleanup code
  41.  
  42.     -> AmiTCP: cleanup everything
  43.     amitcp_cleanup()
  44.   ENDPROC
  45.  
  46. The initialisation code opens the 'bsdsocket' and 'usergroup'
  47. libraries, initialises I/O variables and opens a timer.  It also sets
  48. up various other arrays.  If you want your can just use the bits you
  49. need from the 'amitcp/init' directory.  It should be fairly
  50. self-explanatory.
  51.  
  52. Anyway, the key thing is this: if you use one of the init routines
  53. (e.g., amitcp_init() for the whole lot), then you must make sure you
  54. match it with the corresponding cleanup call (amitcp_cleanup() for
  55. amitcp_init()).  I'd advise that you use the exception handling method
  56. shown above.  Also, your program should *NEVER* use E's CleanUp()
  57. function, as this terminates your program immediately and gives it no
  58. chance to perform its own cleanup.
  59.  
  60. Have fun!
  61.  
  62. Jason  (jason@fsel.com)
  63.