(Thx Mahadevan.)
Can I get some pointers on how to set up the Handler plz:
Like what method would I detect the event of connection made?
(*Connection Accepted/Refused-exception -- is host is up)
and what method would I detect that the time out event?
( * Connection timedout -- *device" most probably not up )
?
hints?
Also, I have a class that does :
" public void ping(SocketAddress address) {
( ( IoConnectorConfig )
_mConnector.getDefaultConfig()).setConnectTimeout( 30 );
_mConnector.connect(address, _pb);
"
But in my handler I have to tell it that I am sending a message, in my
case an empty tcpip "msg"/ping to a ip:port.
How do I send an empty message from Handler, just ""?
tia,
.V
G.S.S. Mahadevan wrote:
here are some possible error codes:
* Connection Accepted/Refused-exception -- is host is up
* Connection timedout -- Host most probably not up
<snip>
So you can use SocketConnector.connect() and ThreadPool to get that
functionality.
Hope this helps
mahadevan