Working with two streams at once: ack pth! 
Author Message
 Working with two streams at once: ack pth!

Okay, here's the scoop: I'm working on a multi-user BBS type of project,
which allows the user to telnet in, and do lots of neat stuff
(eventually). I would like to make the multi-user part more interesting
by allowing users to send messages to each other, and maybe even have a
CB/IRC type mode where they could join SIG-Channels or something...

Anyway, to do this, I need to have two streams, one to handle all the
users I/O, and another to handle incomming messages.

My original plan was to open a FIFO, and then setup ioctl to send a
SIGIO/SIGPOLL when there was some information on the FIFO... Then I could
have a subroutine print the messages and then leave the user where she
was before.

Well, problem one, it seems that an open() to a FIFO blocks until someone
picks up the other end, which won't do, because I said so. =)

Problem two, I can't find the correct way to set the FIFO to send the
SIGIO... (This is on a SPARC running SunOS 4.1.3_U1)

If it turns out that there is nothing I can do about the FIFO blocking,
is it possible to create a socket-file (like Term does), or a dgram
socket that would send a SIGIO?

If there is any interest, I'll post a summary of the replies, for all to

(insert 'sortof' right after Perl Programmer in my sig... <grin>)

|o| Programmer, Owner of a Sun SPARCstation and an HP48G. PYLON Information |o|
|o| Network: "Internet for the rest of us." telnet, or dial |o|
|o|    632-1464 (data), 632-1702 (voice). PGP Key available upon request    |o|

Wed, 14 May 1997 12:49:15 GMT  
 [ 1 post ] 

 Relevant Pages 

1. TBtr Demos

2. Delphi & BDE & AS/400

3. Access Ack Ack

4. How to take two input streams?

5. One output stream to two dests

6. BP under win95

7. Linking with 'C' .OBJs for TP7

8. BDE help needed

9. Help with programming!

10. Matching two patterns at once

11. Doing two tasks at once

12. File I/O: want to compare two or more lines @ once


Powered by phpBB® Forum Software