I did a test server a couple months ago with RevCGI and had a couple people connect in via telnet where we chatted in a rather weirdly redrawn chat so it is very possible to do as a CGI..