Changeset 39


Ignore:
Timestamp:
Aug 29, 2012 6:38:17 PM (5 years ago)
Author:
psaiteja
Message:

Just a minor change. In the Server UDP thread's sendoldhashes() method, added a variable to keep track of how many hash entries are pushed to the newly joined client.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • VSNServer/src/ServerProxy.java

    r36 r39  
    394394                        ResultSet rs = stmt.executeQuery("select * from ServerHashlist where Occurrence >="+m_threshold); 
    395395                        int num = 0; 
     396                        int count = 0; 
    396397                        //java sql timestamp of the format: yyyy-mm-dd hh:mm:ss.fffffffff 
    397398                        //considering 75 bytes (2 sha1 digests (40 bytes) + timestamp (30 bytes) +3 tabs (3 bytes)+ 1 newline (1 byte) ) per hash entry, and max 1400 MTU for the UDP packet 
     
    401402                                sendhashdata += rs.getString(1)+"\t"+rs.getString(2)+"\t"+rs.getTimestamp(3)+"\n"; 
    402403                                num++; 
     404                                count++; 
    403405                                if(num==MAX_per_packet){ 
    404406                                        byte [] sendData = sendhashdata.getBytes(); 
     
    416418                                sendhashdata = ""; 
    417419                                num = 0; 
    418                                 System.out.println("UDP: Sent "+num+" hash entries to IP:"+ip+" port:"+port); 
     420                                System.out.println("UDP: Sent "+count+" hash entries to IP:"+ip+" port:"+port); 
    419421                        } 
    420422                         
Note: See TracChangeset for help on using the changeset viewer.