Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!att!cbnewsl!kc From: kc@cbnewsl.att.com (keith.coulson) Newsgroups: comp.unix.questions Subject: Re: Using poll() on a UDP stream in TLI Summary: events field Message-ID: <1990Dec14.190557.17779@cbnewsl.att.com> Date: 14 Dec 90 19:05:57 GMT References: <1990Dec14.193732.5121@world.std.com> Organization: AT&T Bell Laboratories Lines: 35 In article <1990Dec14.193732.5121@world.std.com>, bunyip@world.std.com (Jason W May) writes: > > Under TLI, is it possible to poll() on a file descriptor that is associated > with a UDP transport provider? e.g., > > > int fd; > struct pollfd pollfd; > struct t_unitdata *udataptr; > > > fd = t_open ("/dev/udp", O_RDWR, NULL); > > /* t_bind, t_alloc, etc. */ > > pollfd.fd = fd; > poll (&pollfd, 1, -1); > > t_rcvudata (fd, udataptr, &flags); > > > When I try this, the poll() never returns. Things work fine if I leave > out the poll and the server just waits for a datagram to arrive; but I > would like to multiplex and listen on a set of streams where several > could be connection-oriented and several connectionless. > > > Thanks, > > Jason (bunyip@world.std.com) Did you set the events field of pollfd (e.g. pollfd.events = POLLIN) Keith Coulson kc@cbnewsl.att.com