Thread: NoO!! I am really ........ed off!!

  1. #1
    Unregistered
    Guest

    NoO!! I am really ........ed off!!

    Today is the day that many OptusNet Cable subscribers hoped would never come. According to reports from The Age, SMH and Australian IT, and confirmed by Whirlpool directly with Optus, NetStats will be phased out on July 1 and 'soft limits' will be placed on the OptusNet Cable service. If the user goes over this limit, the speed of their service will be capped to around 28.8k. Uploads will not be counted.

    An Optus Public Affairs spokeswoman said Optus planned to make a full announcement to customers this week with more details.

    The plans for Optus Choices subscribers will be as follows:
    550MB - $54.95

    3GB - $69.95

    5GB - $134.95

    10GB - $265.95

    No information is available regarding non-Choices prices, but past experience shows that it could be in the order of $5 more per month. Existing contracts will be honoured and they will be able to continue using NetStats until the end of their term (the average user will most likely take a dive after 1 July though).

    Still unknown is whether there will be 'free sites' where downloads won't be counted, such as game servers.
    [B]Taken from www.whirlpool.net.au[B]
    This mean I wont be able to dowload much anymore using my OptusNet cable! I am so sad .

    The reason I posted this was becuase I'm going to need to keep track of how much I download in the future, so I want to write/obtain a program that logs every byte that you recieve over the active connection and erases this log every month.

    Does anybody know of a program that does this, or better yet, does anybody have some code that would be able to log this information? (I could add all the other feutures myself).

    I would be VERY APRECIATIVE if anybody could donate this code. I could be a sort of open-source donation to this board that everybody can share . C'mon, I beg of you - I need this!

    Thank you VERY much

    -Chris

  2. #2
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    This thread was by me - I obviously wasn't logged in...

  3. #3
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    I had a hard 2 GB down/week limit while at school.. it's not a big deal, I didn't ever really exceed 300 megs/week. And if it is, you need to start buying your movies/software/porn/music :P.

    You should really tell them you want to be able to see their logs on you.. thats how we had it at school at least.
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  4. #4
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    ...thanks for replying

    Yeah, but I would really like to see my usage go up as i'm downloading so I can stop it or something. I would be VERY useful and helpfull for alot of people...

  5. #5
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    I assume you are running windows?

    I know windows 2000 has such a feature built in, except it resets everytime you restart the computer. Similair story with Linux (mandrake at least).
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Why is it, with the highest customer satisfaction in the land, that Optus has to got the way of its evil brother Telstra.

    I don't understand why it is much cheaper to have 3 x 3gb (Au$210) accounts than one 10gb (Au$265) account? (same with Telstra)

    What do we expect. One company owns all the phone lines and has to be regularly reminded they work for the Aust tax payer, not exclusively for their shareholders.

    One thing to be thankful for FaceMaster, you can get broadband. I have a letter from the federal communications minister, Sen Alston, stating by house is in a remote area. I have talked to all the gov ministers, fed and state, without joy and am now tring to get DOLA to reduce my land tax.

    I live <10Km from the CBD of a capital city, close suburbia. Its just Telstra went the cheap option when extending the local exchange (a RIM using optic fiber instead of copper) and there is no cable planned, ..... ever.
    Last edited by novacain; 05-20-2002 at 02:38 AM.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  7. #7
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    >>I assume you are running windows?

    Yes, I am running Windows XP

    Anybody got some coding ideas?

  8. #8
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Oh, and by the way, all this is in Australia and all prices are in AU dollars, so don't be confused americans...

  9. #9
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    I started some code; it would be cool if everybody added smething to it to make it complete...
    Code:
    // Download Recorder - started by Chris Pocock - AKA "face_master"
    // Used to record and log every byte that is downloaded
    // Needs socket functionality
    // Needs main dialog box recource + dialog box controls
    
    #include <windows.h>
    #include <fstream.h>
    #include <time.h>
    #include "Resource.h" // Needs to be created and added
    
    #define ID_TIMER 1
    
    // Globals
    int byte_count = 0; // Count of how much is downloaded
    int just_downloaded = 0; // Amount downloaded in last second,
                             // though, i'm not sure how you would
                             // effectively store the last bytes 
                             // downloaded in the last second into
                             // this variable...
    char byte_display[MAX_PATH];
    char time_str[MAX_PATH];
    
    // Prototypes
    void GetDownloadValue();
    void ExportLog();
    void DisplayLog(HWND);
    void GetTime();
     
    // Callbacks 
    BOOL CALLBACK APP_DlgProc(HWND, UINT, WPARAM, LPARAM); 
    
    int APIENTRY WinMain( 
       HINSTANCE hInstance, HINSTANCE hPrevious, LPTSTR lpsz, int iCmd) 
    { 
       // Run main dialog 
    
        // "DLG_MAIN" is yet to be defined
    	BOOL b = DialogBox(hInstance, "DLG_MAIN", NULL, APP_DlgProc); 
    
       return b; 
    } 
    
    BOOL CALLBACK APP_DlgProc(HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) 
    { 
       switch(uiMsg) 
       { 
       case WM_INITDIALOG: 
          SetTimer(hDlg, ID_TIMER, 1000, NULL);
          break; 
    
       case WM_TIMER: // Handle timer messages
    	   byte_count += just_downloaded;
    	   itoa(byte_count, byte_display);
    	   SetDlgItemText(hDlg, IDC_DOWNLOADED, byte_display); // IDC_DOWNLOADED yet
    	   break;                                              // to be defined in 
    	                                                       // "Resource.h"
       
       case WM_COMMAND: // for controls of dialog box which are yet to be added
          switch(wParam) 
          { 
          case IDOK: 
    
          case IDCANCEL: 
              KillTimer(hDlg, ID_TIMER);         
    		  EndDialog(hDlg, FALSE); 
             return FALSE; 
          } 
          break; 
       } 
    
       return FALSE; 
    }
    
    void GetDownloadValue() // Needs alot of work which I cannot attend to
    {
    	// alter 'just_downloaded' variable so it contains the amount of bytes that
    	// were just downloaded
    }
    
    void ExportLog()
    {
    	char log_data[MAX_PATH];
    
    	itoa(byte_count, log_data);
    
    	GetTime();
    	
    	ofstream log("log.dat", ios::ate);
    
    	log << Log Entry at: ";
    	log << time_str;
    	log << "\n";
    	log << log_data;
    	log << "\n\n";
    }
    
    void GetTime() // Dunno if I did any of this right - 
    {              // i've never used any of these before
       time_t Time;
       time( <ime );
       time_str = ctime(<ime);
    }
    
    void DisplayLog(HWND hDlg) // Set the text inside an edit control in the dialog box
    {
    	char log_str[BUF_SIZE]; // Used to store the contents of the log
    	
    	// First import the contents of the log file into 'log_str'
    	// not done yet...
    	
    	SetDlgItemText(hDlg, IDC_LOG, log_str); // IDC_LOG is yet to be defined...
    }
    Feel free to add to it

  10. #10
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    It still needs a timer that goes off every hour to trigger ExportLog(), though

  11. #11
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

    Cool

    Just thought of another thing it needs; it needs to import a different text file which contains the total amount of bytes downloaded, and then it should alter the byte_count variable acording to whats in the file.

  12. #12
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Here's my code so far with some error fixes and stuff added and the recources attacched - I need help, though...
    Code:
    // Download Recorder - started by Chris Pocock - AKA "face_master"
    // Used to record and log every byte that is downloaded
    // Needs socket functionality
    // Needs main dialog box recource + dialog box controls
    
    #include <windows.h>
    #include <fstream.h>
    #include <time.h>
    #include "Resource.h" 
    
    #define ID_TIMER 1
    
    // Globals
    int byte_count = 0; // Count of how much is downloaded
    int just_downloaded = 0; // Amount downloaded in last second,
                             // though, i'm not sure how you would
                             // effectively store the last bytes 
                             // downloaded in the last second into
                             // this variable...
    char byte_display[MAX_PATH];
    char time_str[MAX_PATH];
    
    // Prototypes
    void GetDownloadValue();
    void ExportLog();
    void DisplayLog(HWND);
    void GetTime();
     
    // Callbacks 
    BOOL CALLBACK APP_DlgProc(HWND, UINT, WPARAM, LPARAM); 
    
    int APIENTRY WinMain( 
       HINSTANCE hInstance, HINSTANCE hPrevious, LPTSTR lpsz, int iCmd) 
    { 
       // Run main dialog 
    
        
    	BOOL b = DialogBox(hInstance, "DLG_MAIN", NULL, APP_DlgProc); 
    
       return b; 
    } 
    
    BOOL CALLBACK APP_DlgProc(HWND hDlg, UINT uiMsg, WPARAM wParam, LPARAM lParam) 
    { 
       switch(uiMsg) 
       { 
       case WM_INITDIALOG: 
          SetTimer(hDlg, ID_TIMER, 1000, NULL);
          break; 
    
       case WM_TIMER: // Handle timer messages
    	   byte_count += just_downloaded;
    	   itoa(byte_count, byte_display, 10);
    	   SetDlgItemText(hDlg, IDC_BYTES, byte_display); 
       
       case WM_COMMAND: 
          switch(wParam) 
          { 
          case IDC_ABOUT:
    		  MessageBox(hDlg, "Records your downloads and displays them. Current version completely written by Chris Pocock ('face_master').", "Download Recorder", MB_OK);
    		  break;
    
    	  case IDC_SHOWLOG:
    		  DisplayLog(hDlg);
    		  break;
    	  
    	  case IDOK: 
    
          case IDCANCEL: 
              KillTimer(hDlg, ID_TIMER);         
    		  EndDialog(hDlg, FALSE); 
             return FALSE; 
          } 
          break; 
       } 
    
       return FALSE; 
    }
    
    void GetDownloadValue() // Needs alot of work which I cannot attend to regarding sockets etc...
    {
    	// alter 'just_downloaded' variable so it contains the amount of bytes that
    	// were just downloaded
    }
    
    void ExportLog()
    {
    	char log_data[MAX_PATH];
    
    	itoa(byte_count, log_data, 10);
    
    	GetTime();
    	
    	ofstream log("log.dat", ios::ate);
    
    	log << "Log Entry at: ";
    	log << time_str;
    	log << "\n";
    	log << log_data;
    	log << "\n\n";
    }
    
    void GetTime() // Dunno if I did any of this right - 
    {              // i've never used any of these before
       time_t Time;
       time( Time );
       time_str = ctime(Time);
    }
    
    void DisplayLog(HWND hDlg) // Set the text inside an edit control in the dialog box
    {
    	char log_str[MAX_PATH]; // Used to store the contents of the log
    	
    	// First import the contents of the log file into 'log_str'
    	// not done yet...
    	
    	SetDlgItemText(hDlg, IDC_LOG, log_str);
    }
    But I get these errors...
    Code:
    error C2664: 'time' : cannot convert parameter 1 from 'long' to 'long *'
    'ctime' : cannot convert parameter 1 from 'long' to 'const long *'

  13. #13
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    ...oh I forgot to upload the Resurce files so here they are...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ........ed off at functions
    By Klinerr1 in forum C++ Programming
    Replies: 8
    Last Post: 07-29-2002, 09:37 PM
  2. severely ........ed off
    By iain in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 01-06-2002, 09:50 PM
  3. Thou ark ........ed off...
    By CodeMonkey in forum Windows Programming
    Replies: 2
    Last Post: 11-29-2001, 03:35 PM