MESSAGE
| DATE | 2005-02-11 |
| FROM | From: "Martin, Jared"
|
| SUBJECT | Subject: [hangout] Monitoring input in simple chat exercise.
|
From owner-hangouts-destenys-at-mrbrklyn.com Fri Feb 11 18:57:42 2005 X-UIDL: `GP"!O,O!!_28!!4o?"! Received: from www2.mrbrklyn.com (LOCALHOST [127.0.0.1]) by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id j1BNvgp3014934 for ; Fri, 11 Feb 2005 18:57:42 -0500 Received: (from mdom-at-localhost) by www2.mrbrklyn.com (8.12.11/8.12.3/Submit) id j1BNvgXo014933 for hangouts-destenys; Fri, 11 Feb 2005 18:57:42 -0500 X-Authentication-Warning: www2.mrbrklyn.com: mdom set sender to owner-hangouts-at-www2.mrbrklyn.com using -f Received: from DGEXCHANGE03.DGLAW.COM (exchange.dglaw.com [216.91.14.105]) by mrbrklyn.com (8.12.11/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id j1BNvgud014928 for ; Fri, 11 Feb 2005 18:57:42 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: [hangout] Monitoring input in simple chat exercise. Date: Fri, 11 Feb 2005 18:58:23 -0500 Message-ID: <9A6B8130C7F3BD49AC80282BE493A7DB262CD1-at-DGEXCHANGE03.DGLAW.COM> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Monitoring input in simple chat exercise. Thread-Index: AcUQlZHveMigGROtTLanpYFo8ZQ+2Q== From: "Martin, Jared" To: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mrbrklyn.com id j1BNvgud014928 Sender: owner-hangouts-at-mrbrklyn.com Precedence: bulk Reply-To: "Martin, Jared" List: New Yorker GNU Linux Scene Admin: To unsubscribe send unsubscribe name-at-domian.com in the body to hangout-request-at-www2.mrbrklyn.com X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on www2.mrbrklyn.com X-Spam-Status: No, score=-0.8 required=4.0 tests=AWL autolearn=failed version=3.0.0 X-Spam-Level: X-Keywords: X-UID: 38407 Status: RO Content-Length: 1056 Lines: 29
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
|
|