Boris, you shouldn't
need to write any C code at all just to
do TCP/IP sockets in AOLserver. There are Tcl commands for that.
Look at the 11 or so
ns_sock*
AOLserver Tcl API commands. Stock Tcl also has its own
socket
command which you should be able to use from AOLserver as well. Note
that the AOLserver
ns_sendmail
Tcl command is in fact implemented entirely in Tcl, no C code, and
uses those socket commands to talk to an SMTP server.
You might eventually want to write C code though, in order to
take advantage of fancier AOLserver features. I'm not familiar with
this, but people have used both AOLserver 3.x and 4.x to implement
(high performance, I think) non-HTTP servers in AOLserver, e.g. SMTP,
POP3, and DNS servers. Currently that requires patches to AOLserver
4.x, but people are working on integrating those patches in the stock
AOLserver release. See in particular SourceForge Feature Requests
726288 and
973010.