Package net.solosky.maplefetion.net

Examples of net.solosky.maplefetion.net.Port


   */
  private Transfer buildTransfer(ArrayList<Port> portList)
  {
    TransferFactory factory = this.context.getTransferFactory();
    Transfer transfer = null;
    Port     port     = null;
    Iterator<Port> it = portList.iterator();
    while(it.hasNext()) {
      port = it.next();
      //尝试建立连接
      try {
View Full Code Here


   */
  @Override
  protected Port getLocalPort(Transfer transfer)
  {
    TcpTransfer trs = (TcpTransfer) transfer;
    return new Port(trs.getSocket().getLocalAddress(), trs.getSocket().getLocalPort());

  }
View Full Code Here

  @Override
  protected Port getLocalPort(Transfer transfer)
  {
    MinaTransfer ts = (MinaTransfer) transfer;
    InetSocketAddress addr = (InetSocketAddress) ts.getSession().getLocalAddress();
    return new Port(addr.getAddress(), addr.getPort());
  }
View Full Code Here

      //解析地址和端口
      String addr = mc.group(1);
      String[] addrs = addr.split(";");
      for(int i=0; i<addrs.length; i++) {
        try {
                  this.portList.add(new Port(addrs[i]));
                } catch (UnknownHostException e) {
                  throw new ParseException("Unkown host - Port="+addrs[i]);
                }
      }
      //解析凭证
View Full Code Here

     */
    @Override
    public Port getDefaultTransferLocalPort()
    {
      try {
          return new Port("127.0.0.1:8001");
        } catch (UnknownHostException e) {
          return null;
        }
    }
View Full Code Here

TOP

Related Classes of net.solosky.maplefetion.net.Port

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.