I don't know much about this myself, but according to the Old Macintosh System Software and TCP/IP page of Vintage Networking information, for System 6 you would need to use MacTCP.
A previous discussion on MacTCP Documentation mentions the MacTCP SDK, which includes the "MacTCP Programmer's Guide" pdf file.
Example source code may be useful. There is source available for a very old version of Eudora. I don't know if it is a good example.
A previous discussion on MacTCP Documentation mentions the MacTCP SDK, which includes the "MacTCP Programmer's Guide" pdf file.
Example source code may be useful. There is source available for a very old version of Eudora. I don't know if it is a good example.