Hey, guys -
Sorry I'm so late in responding...a million balls in the air right now. I appreciate the helpfulness, though.
I am indeed using TCP. My code follows the sequence on the server side of this diagram:
http://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/InternetSocketBasicDiagram_zhtw.png/420px-InternetSocketBasicDiagram_zhtw.png
So, one problem is, when one client has engaged the server, and another user tries to access it, telnet just echoes whatever he types in. I suppose, though, that this is the nature of telnet, and there's not much I can do about it.
But, when the first client has finished, the second client can't always get in, despite the fact that my server returns to the accept() call. (it works fine when someone tries to get in *after* the first user is finished.) I was wondering whether somehow, the second user, even though he can't connect, could somehow be confusing the server. And if so, is there a way to clear out any old stuff before calling accept() again?
And, ResidentBiscuit: I'm not married to telnet at all, but I don't know enough about SSH to do anything with it. Plus, the less stuff that the app depends on the client side having, the better off we are. But if you know of a good online tutorial for SSH that I could use, feel free to so advise me.
Thanks again...