when the pipe resign or stop connecting,how to find it leave.
thanks in advance!
the methods for this are available in the jxta API:
when connecting you can either use a pipe messenger event to notify you of a connection or you can use the "connect" method with a timeout, which blocks until the pipe is either connected or the timeout expires.
You can also call the "isBound()" method at any time to check if the pipe is bound to a remote peer.
thanks for your answer.
but the situation is that pipe have connected.so the connect timeout is no use.and the a pipe messenger event only have three type:connected ,failed,closed. i need the event,disconnected but not closed.
the method isBound ,i have not tested.but form Socket doc ,the method isBound seem not the solution to the problem.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.