From: bre@mtq02.wzl.rwth-aachen.de (Joerg Bredno) Newsgroups: comp.windows.x.motif,comp.unix.programmer Subject: Re: How to do Sockets in Motif? Date: 8 Jun 1995 11:03:46 GMT rtedw1@mdw059.cc.monash.edu.au (Russell Edwards) writes: > I realise it's probably a silly choice for a first X program, but I'm trying > to write a Motif based client for a little 2 player TCP/IP game I wrote. I'm > wondering how I am going to handle the I/O though, as the client can > receive socket messages at any time which should be acted upon ASAP. > Looking at some code I wrote some months ago, I'd say it works like this: Having got a socket listening somewhere, use XtAppAddInput. Then a callback will be started whenever there is a possibility to read from the socket. In this callback, accept the data and close the accepting socket after having read whatever comes from the other application. Hope this helps, Joerg Bredno in Aachen (germany)