"Anatoly Karp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > > I am writing a single-threaded server in Cache and I want to > prevent any further TCP connections to my port once I have accepted > the first connection. [Note that TCP stack accepts new connections > even though the main thread makes no attempt to communicate over > those new connections - thus the client may take unduly long time > to discover that nobody is talking with them]. > > With the traditional Berekeley socket API > this would've been easy due to the distinction between the > listening and connected sockets (so I could just close > the listening socket immediately after return of accept()). > With Cache I have so far not found any way to achieve this > effect. Any ideas? > > thanks, > --Anatoly
I think what you'd have to do is use the job command to pass the connection socket to another process and then the server can close the file which will shut down the listening socket. Search the documentation for "concurrent" to locate the job command syntax you need.
