julienxx
/EasyNet
/amendments
/7
add README
julienxx made amendment 7 about 15 hours ago
--- README Sun Oct 25 18:08:12 2026
+++ README Sun Oct 25 18:08:12 2026
@@ -0,0 +1,46 @@
+EasyNet
+=======
+
+Simple TCP networking wrapping OpenTransport.
+
+Files
+-----
+EasyNet.h public API
+EasyNet.c implementation
+HelloWorld.c example finger client
+
+Building
+--------
+Tested with CodeWarrior Pro 6 under Mac OS 9.2 with a PPC machine.
+
+1. Create new project
+2. Add EasyNet.c and HelloWorld.c to the project
+3. Add from Mac OS Support:Universal:Libraries:
+ PPCLibraries:OpenTransportAppPPC.o
+ PPCLibraries:OpenTptInetPPC.o
+ StubLibraries:OpenTransportLib
+ StubLibraries:OpenTptInternetLib
+4. Build and run
+
+Usage
+-----
+EasyNet_Init
+EasyNet_Shutdown
+ Call once at app start / quit.
+
+EasyNet_Connect(host, port, timeoutSecs, &conn)
+ Resolves host, opens TCP connection. Returns noErr or error.
+
+EasyNet_Send(conn, data, length)
+EasyNet_SendString(conn, s)
+ Sends all bytes. Returns noErr or error.
+
+EasyNet_Receive(conn, buf, size)
+ Returns > 0 bytes received, 0 server closed, < 0 on error.
+ Does not add terminating '\0'.
+
+EasyNet_Close(conn)
+ Closes the connection and frees it.
+
+kEasyNetCRLF
+ Network line ending, use it instead of "\r\n".