Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!noose.ecn.purdue.edu!en.ecn.purdue.edu!irick From: irick@en.ecn.purdue.edu (GarBear Irick) Newsgroups: comp.unix.questions Subject: read a single char from a socket under BSD4.3 Message-ID: <1990Nov29.170553.25369@en.ecn.purdue.edu> Date: 29 Nov 90 17:05:53 GMT Distribution: usa Organization: Purdue Society for Better Computing Lines: 17 OK, I finally took the plunge and started learning how to use sockets yesterday. I have a small program that chats amongst machines happily now, but there is one catch: how do I read a single CHARACTER at a time from a socket descriptor? I wrote my own small server, and am using telnet as my client, 'til I get TIME to write one. Is telnet doing the buffering on its end, or as there something I can do on the receiving end? I tried using some ioctl and fcntl calls that looked promising, but NOPE. I have yet to resort to setbuf or its cousins. Is there some obvious solution, or is it just telnet doing its wonderful magic again?? :| Just another UNIX hacker.... -- Gary A. Irick, Purdue University | "You can log out any time you like, INTERNET: irick@en.ecn.purdue.edu | But you can never leave!" UUCP: ...!ucbvax!pur-ee!irick | (apologies to The Eagles)