Re: Listening to Windows Socket events



On Nov 17, 6:39 pm, David Gravereaux <davyg...@xxxxxxxxx> wrote:
moustafan wrote:
WSAAsyncSelect(mySocket,
...
My question is:
How to ask tcl event loop that I want it to notify me when the OS
(Windows) sends the message WM_USER ?

It might be easier to use WSAEventSelect for your core by not needing an
hwnd, or even discard it completely in favor of Tcl's socket API and
call it directly from C.

chan = Tcl_OpenTcpClient(interp, 1024, "example.com", "", 0, 1);
Tcl_SetChannelOption(interp, chan, "-translation", "line");
Tcl_CreateChannelHandler(chan, TCL_READABLE, readProc, NULL);

Going that route, you might consider leaving all the IO and eventloop
to the script level and limiting the C-Tcl interaction to atomic data
exchanges.

-Alex

.



Relevant Pages

  • Re: Listening to Windows Socket events
    ... moustafan wrote: ... How to ask tcl event loop that I want it to notify me when the OS ...
    (comp.lang.tcl)
  • Re: task scheduler
    ... >> Ann; ... >> Receive Notification of Missed Tasks (All Windows) ... >> Exit your registry, you may need to restart or log out of Windows ... is there a way to notify me. ...
    (microsoft.public.windowsxp.general)
  • Re: DSL
    ... Windows, AV products, and various other ... only', 'Download and Notify', or 'Download and Install'. ... One asks, many answer, all learn - Plato, on the 'Forum ... you are about to experience what is called Latent Demand. ...
    (misc.news.internet.discuss)
  • RE: OnSessionEnding(object sender, SessionEndingEventArgs e) fails
    ... but OnSessionEnding(fails to notify about shutdown. ... > I have a windows form that when it closes it simply hides itself in ... > when you shutdown Windows, the OnClosing is overridden by my code since I ...
    (microsoft.public.dotnet.framework)
  • Re: task scheduler
    ... Receive Notification of Missed Tasks (All Windows) ... By default when you are using Task Scheduler to automatically run programs ... >>> If the task is failed, is there a way to notify me. ...
    (microsoft.public.windowsxp.general)