Yuvaraj Athur Raghuvir wrote:
Polling what? All I know is that when the socket "wakes up" the
socket_handler is invoked. Is there any specific api/callback  I should use
so that when the socket wakes up, I can continue with the execution?

Alternatively, can I "wait" on an event that gets set in the socket_handler
and allows the verb to sleep until that event happens?

polling sdselect. however if sdasync is reliable enough you can wait for socket_handler. eg.

form_send_button=: 3 : 0
sdsend .... your msg ...
)

socket_handler=: 3 : 0
sdselect
sdrecv ... response ..
if. got all data do.
  finish processing
  form_send_button ... your next msg ...
end.
)

finding out where is the loop and when does it go sleeping in the above code is left as an exercise.

--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to