if ( message_id.equals( BTMessage.ID_BT_HANDSHAKE )){
handshake_received = true;
BTHandshake handshake = (BTHandshake)message;
info_hash = handshake.getDataHash();
num_pieces = 500 + (info_hash[0]&0xff);
// we use the piece at 'n' + 1 to indicate a close request by sending a HAVE for it
// this helps us tidily close things