MESSAGE
DATE | 2005-02-11 |
FROM | From: "Martin, Jared"
|
SUBJECT | Subject: [hangout] Monitoring input in simple chat exercise.
|
I'm working on creating a simple chat program to get my feet wet in c.
I've been told its better to avoid threads, so I'm using select to monitor multiple connections from clients.
How do I get the client to check for new data on both the network conn as well as input from the user without having one block the other?
Should I use select on the client too or is there a better way of doing it. Perhaps recv with peek would work to check the socket, but I've not yet figured out how to receive input from the user without blocking and without checking for individual keystrokes.
Suggestions/Links/Code would be very greatly appreciated.
Sincerely, ***************************** Jared Martin IT Desktop Support Davis & Gilbert LLP 1740 Broadway New York, NY 10019 Help Desk: 212-237-1500 Office: 212-237-1504 Cell: 646-773-4138 Fax: (212) 974-7023 *************************************
____________________________ NYLXS: New Yorker Free Software Users Scene Fair Use - because it's either fair use or useless.... NYLXS is a trademark of NYLXS, Inc
|
|