Hi,
Kid said:
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