On Thu, 19 Feb 2009, Henry Rich wrote:
> Error means OOB? Wow. How'd you learn that?
I did not look at the details of winsock for several years so my
memory might not serve me, please re-check for accuracy.
> You are saying socket_handler is edge-triggered on read and write, but
> what I have seen (if I tested correctly) is that it is edge-triggered
> only on write, and on read it calls whenever there is work. So:
It also applies to read in that it will only trigger an event for a
particular socket once. If you choose to ignore, that socket will not
trigger another read event again. However if you do a sdread, the mask
flag is cleared and it will trigger again.
> data arrives on sockets 0 and 1
> socket_handler is called
> it reads socket 0
> socket_handler exits
> socket_handler is immediately called again
This should be trigger by socket 0 (which is re-enabled after sdread)
or socket 1 (which is already inside message queue),
>
> or
>
>
> data arrives on socket 0
> socket_handler is called
> it reads socket 0, but only part of the data
> socket_handler exits
> socket_handler is immediately called again
same as above, read event is re-enabled after sdread.
>
>
> > The sdasync actually provide information for the identification of
> > socket and the type of event. If you process this message then it is
> > no need to do sdselect.
> >
>
> I don't understand what you mean here. What message are you talking
> about, and how do I process it? (Are you hinting at a general way of
> handling messages that wd doesn't support? That would be great.)
>
You might modify the sdasync verb in socket.ijs by sending a mousemove
message to a isigraph inside a form and filling its wparam lparam with
socket id and event id. Inside the form you write a verb for
mousemove event of that isigraph and re-interpret its mouse co-ordinates
as socket id. Once you know the socket id and event type you can
process without sdselect.
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩290 杜牧 赤壁
折戟沈沙鐵未銷 自將磨洗認前朝 東風不與周郎便 銅雀春深銷二喬
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm