JxtaBiDiPipe主动连接的问题
日期:2011-09-21
点击:186
来源: 未知
分享至:
首先看几个connect方法
/**
* Connect to a JxtaServerPipe with default timeout
*
* @param group group context
* @param pipeAd PipeAdvertisement
* @throws IOException if an io error occurs
*/
public void connect(PeerGroup group, PipeAdvertisement pipeAd) throws IOException {
connect(group, pipeAd, timeout);
}
/**
* Connects to a remote JxtaBiDiPipe
*
* @param group group context
* @param pipeAd PipeAdvertisement
* @param timeout timeout in ms, also set.html' target='_blank'>reset object default timeout
* to that of timeout
* @throws IOException if an io error occurs
*/
public void connect(PeerGroup group, PipeAdvertisement pipeAd, int timeout) throws IOException {
connect(group, null, pipeAd, timeout, null);
}
/**
* Connects to a remote JxtaServerPipe
*
* @param group group context
* @param peerid peer to connect to
* @param pipeAd PipeAdvertisement
* @param timeout timeout in ms, also reset object default timeout to that of timeout
* @param msgListener application PipeMsgListener
* @throws IOException if an io error occurs
*/
public void connect(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAd, int timeout, PipeMsgListener msgListener) throws IOException {
connect(group, peerid, pipeAd, timeout, msgListener, isReliable);
}
/**
* Connects to a remote JxtaServerPipe
*
* @param group group context
* @param peerid peer to connect to
* @param pipeAd PipeAdvertisement
* @param timeout timeout in ms, also reset object default timeout to that of timeout
* @param msgListener application PipeMsgListener
* @param reliable Reliable connection
* @throws IOException if an io error occurs
*/
public void connect(PeerGroup group, PeerID peerid, PipeAdvertisement pipeAd, int timeout, PipeMsgListener msgListener, boolean reliable) throws IOException
{
this.peerid = peerid;
this.pipeAdv = pipeAd;
this.group = group;
this.msgListener = msgListener;
this.isReliable = reliable;
if (isBound())
{
throw new IOException(\"Pipe already bound\");
}
if (timeout
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史