Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐:
搜索:
您的位置: Linux安全网 > Linux编程 > » 正文

JxtaBiDiPipe主动连接的问题

来源: 未知 分享至:

首先看几个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, alsset.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 

Tags:
分享至:
最新图文资讯
1 2 3 4 5 6
验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史