sdasync works very well for me.  I just wait for the scoket-handler
call and I haven't lost a socket in 3 years.

Henry Rich 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of bill lam
> Sent: Friday, December 21, 2007 9:05 AM
> To: Programming forum
> Subject: Re: [Jprogramming] How to sync verb execution with 
> asyncsocket communication?
> 
> 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
> 

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

Reply via email to