Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!BRILLIG.UMD.EDU!don From: don@BRILLIG.UMD.EDU (Don Hopkins) Newsgroups: comp.windows.news Subject: Has anybody written... Message-ID: <8905100117.AA01691@brillig.umd.edu> Date: 10 May 89 01:53:26 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 29 Has anybody written a program to monitor NeWS network connections, that runs in the server? Sort of like newsmon, and sort of like Brett's security popup. A NeWS process could listen on socket 2001, created with "(%socketl2001) (r) file", and wait for connections. When it gets a connection, it calls "acceptconnection" and forks off another process to serve that connection. The 2001 server process would open *another* socket to regular old port 2000, with "(%socketc2000) (w) file", and copy data back and forth. (You'd have to fork a process for each direction. Note: don't depend on bytesavailable being right when it says 0.) Each server process could put up a control panel, with stuff like a scrolling, decoded (i.e. un-CPS-byte-encoded) log of the information passing in each direction, total byte counts, connection age, average bytes/second, remote host name, maybe optional scrolling graphs of various statistics over time, or a histogram showing the number of occurances of each character. Another nice feature would be a way to put a stopper in the stream in either direction (and a way to make new connections come up initially stopped), and a display of the buffered data behind the stopper. Press a button to drip one character through, or a certian number of characters, or to unstop the connection. Open the stopper just a little bit to drip characters through slowly. How about a way to insert strings and arbitrary bytes into the stream in either direction, in front of or behind the stopper? And a search feature where the stream would flow until a certain character (i.e. newline), or a pattern was encountered! If anybody has or makes such a beast, I sure hope they give it away free, because it could help solve a lot of problems! -Don