> Hello
>
> Can I change socket timeout many times after connection built ?
Yes
> Can I use Socket.setSoTimeout anywhere ?
It will only be effective if you use it before you block in a read on
the socket.
You can set the timeout, read, set the timeout read ...

Signature
Knute Johnson
email s/nospam/knute/
Kid - 04 Jan 2008 23:35 GMT
Hi Knute
Thank you very much .
On 1月5日, 上午1時23分, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> > Hello
>
[quoted text clipped - 18 lines]
> ------->>>>>>http://www.NewsDemon.com<<<<<<------
> Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
Hi,
> Hello
>
> Can I change socket timeout many times after connection built ?
>
> Can I use Socket.setSoTimeout anywhere ?
You can find a useful example of what you're trying to do at: -
http://manson.vistech.net/t3$examples/demo_client_web.html
Username: TIER3_DEMO
Password: QUEUE
(Enter and "*" for the Queue Name and then click Get Job Info)
All the client source files are in: -
http://manson.vistech.net/t3$examples/
And if you look at Tier3Socket.java class you will see that the readMessage
method returns 0 if the Socket Read timed out and the setTimeout method is
invoked all over the place from the queue_lookup.html. I use this strategy
to provide the traditional "Working" message for any initially slow database
queries and to provide an erstwhile blocking socket with the ability to
surrender the event processing thread to the browser for window repaints and
button clicks etc.
A seperate thread with JSObject.call(myLovelyJavascriptFunction) is probably
a more AJAXesque way of handling Socket reads but I haven't had time to come
up with an example, as I'm busy trying to get the Flex FABridge example to
build locally. Maybe someone here has a useful JSObject.call() example? I
certaqinly couldn't find a decent one around :-(
Cheers Richard Maher