Re: Suggestion

From: Clifford Beshers <beshers_at_cs.columbia.edu>
Date: Sat, 27 Apr 1996 19:34:54 -0400 (EDT)

   Resent-Date: Sat, 27 Apr 1996 19:07:39 -0400 (EDT)
   Date: Sat, 27 Apr 1996 18:01:54 -0400
   From: jslttery_at_GS148.SP.CS.CMU.EDU
   Resent-From: stk_at_kaolin.unice.fr
   X-Mailing-List: <stk_at_kaolin.unice.fr> archive/latest/1125
   X-Loop: stk_at_kaolin.unice.fr
   Precedence: list
   Resent-Sender: stk-request_at_kaolin.unice.fr
   Content-Type: text
   Content-Length: 570


   How difficult would it be to add a toplevel hook which would call
   functions regularly while STk was running. I'm thinking specifically
   of a better socket implementation (I've just read the spec for
   tcl7.5's socket) which would allow a user to create a server socket
   and specify a function to call when new connections appear on that
   socket. The hook would run every so often and do a non-blocking accept
   on the socket and call the specified function if the accept
   succeeded.

   Is this possible with the current implementation, or is such a hook
   facility required?

   S.


Sounds like a file handler to me. This was easy to do in Tk4.0. My
impression was it just got easier in Tcl 7.5.

You do have to extend the STk interpreter a little, unless there was a
lambda interface that I missed, but it isn't hard.

See the Tk4.0 documentation for Tk_CreateFileHandler
Received on Sun Apr 28 1996 - 01:37:13 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST