Short: Beta AmiTCP mods for Amiga E Author: jason@fsel.com (Jason R. Hulance) Type: dev/e Architecture: m68k-amigaos AmiTCP modules for Amiga E ========================== This is pretty much a beta release of these modules, since I've had no bug reports on the last version (which was some time ago). I'm still in the rather poor position of not actually running AmiTCP myself, so I am reliant on those who are... The sources are included but, as ever, they are just for reference. In particular, you shouldn't try compiling the sources as some of the modules have had to be fiddled with to get unions etc. (and this will affect not just the module with the fiddle in it, but all those that use it). The big difference over the last version is that one of the bitfield operations has been corrected (Wouter's documentation mislead me, but there's no real excuse for me not testing that bit!), and there is now some initialisation code. This was present in the net.lib link library of the SAS/C version, so I guess it might be pretty important. The rest of net.lib has not yet been ported to E (unless someone knows different...). I may start working on it but, again, I'm hardly the best person to do this, not having AmiTCP running on my Amiga! To use the initialisation do something like this: MODULE 'amitcp/init/amitcp_init' PROC main() HANDLE -> AmiTCP: initialise everything amitcp_init() -> Your code EXCEPT DO -> Your cleanup code -> AmiTCP: cleanup everything amitcp_cleanup() ENDPROC The initialisation code opens the 'bsdsocket' and 'usergroup' libraries, initialises I/O variables and opens a timer. It also sets up various other arrays. If you want your can just use the bits you need from the 'amitcp/init' directory. It should be fairly self-explanatory. Anyway, the key thing is this: if you use one of the init routines (e.g., amitcp_init() for the whole lot), then you must make sure you match it with the corresponding cleanup call (amitcp_cleanup() for amitcp_init()). I'd advise that you use the exception handling method shown above. Also, your program should *NEVER* use E's CleanUp() function, as this terminates your program immediately and gives it no chance to perform its own cleanup. Have fun! Jason (jason@fsel.com)