Package org.jmule.core.edonkey

Examples of org.jmule.core.edonkey.UserHash


    File file = new File(USER_HASH_FILE);
    if (!file.exists()) return ;
    FileChannel input_channel = new FileInputStream(file).getChannel();
    ByteBuffer hash = Misc.getByteBuffer(16);
    input_channel.read(hash);
    user_hash = new UserHash(hash.array());
    input_channel.close();
  }
View Full Code Here


        switch (packet_opcode) {
        case OP_PEERHELLO: {
          byte[] data = new byte[16];
          packet_data.get(); // skip user hash's length
          packet_data.get(data);
          UserHash userHash = new UserHash(data);

          byte client_id[] = new byte[4];
          packet_data.get(client_id);
          ClientID clientID = new ClientID(client_id);

          int tcpPort = Convert.shortToInt(packet_data.getShort());

          TagList tag_list = readTagList(packet_data);

          byte[] server_ip_array = new byte[4];
          packet_data.get(server_ip_array);
          String server_ip = Convert.IPtoString(server_ip_array);
          int server_port;
          server_port = Convert.shortToInt(packet_data.getShort());

          _network_manager.receivedHelloFromPeerAndRespondTo(peerIP,
              peerPort, userHash, clientID, tcpPort, tag_list,
              server_ip, server_port);

          break;
        }

        case OP_PEERHELLOANSWER: {
          byte[] data = new byte[16];
          packet_data.get(data);
          UserHash userHash = new UserHash(data);

          byte client_id[] = new byte[4];
          packet_data.get(client_id);
          ClientID clientID = new ClientID(client_id);
View Full Code Here

   
    configuration_manager.initialize();
   
    configuration_manager.start();
   
    UserHash hash = null;
    try {
      hash = configuration_manager.getUserHash();
    } catch (ConfigurationManagerException e1) {
      e1.printStackTrace();
    }
View Full Code Here

  public ClientCreditInfo(byte[] abyKey, long uploadedLo, long downloadedLo,
      long lastSeen, long uploadedHi, long downloadedHi, int reserved3,
      byte[] abySecureIdent) {
    super();
    userHash = new UserHash(abyKey);
    nUploadedLo = uploadedLo;
    nDownloadedLo = downloadedLo;
    nLastSeen = lastSeen;
    nUploadedHi = uploadedHi;
    nDownloadedHi = downloadedHi;
View Full Code Here

TOP

Related Classes of org.jmule.core.edonkey.UserHash

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.