Thread: Downloading of bytes

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

    Downloading of bytes

    Hey everyone. I actually have a programming question this time . Does anybody know if there's a way of detecting if/when bytes are recieved/sent on any currently open socket?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793

    Re: Downloading of bytes

    Originally posted by face_master
    Hey everyone. I actually have a programming question this time . Does anybody know if there's a way of detecting if/when bytes are recieved/sent on any currently open socket?
    Depends how you set the socket up......if you set up the socket asynchronously, then your program will be notified when a socket is ready to be read.......look it up on a few tuts...

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    I'm not talking about any socket that i've created - i'm talking about detecting if bytes have been transfered on any currently connected socket which was created by other programs other than the one i'm writing.

    eg.
    • You have explorer downloading a file of 1024 bytes
    • You have iMesh downloading a file of 2048 bytes

    (Both of the above programs are running on different sockets; both not created by my program).

    After these are both downloaded, the program would have detected that 3072 bytes have been transfered.

    Is this possible?

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Originally posted by face_master
    I'm not talking about any socket that i've created - i'm talking about detecting if bytes have been transfered on any currently connected socket which was created by other programs other than the one i'm writing.

    eg.
    • You have explorer downloading a file of 1024 bytes
    • You have iMesh downloading a file of 2048 bytes

    (Both of the above programs are running on different sockets; both not created by my program).

    After these are both downloaded, the program would have detected that 3072 bytes have been transfered.

    Is this possible?
    Yes....but its pretty difficult and very badly documentd (IMHO)..

    Windows allows for a layered WSP (Winsock Service Provider)....this software component will be called when there's Winsock activity before the WS2_32.dll...therefore you can intercept, modify & monitor packets of info...

    Like I said, its really badly documented, but if its what your interested in, that's the way to go

  5. #5
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    Ah, thankyou. I think I found the right information in my book about LSP's.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reverse Engineering on a Download file
    By c_geek in forum C Programming
    Replies: 1
    Last Post: 03-22-2008, 03:15 PM
  2. Page File counter and Private Bytes Counter
    By George2 in forum Tech Board
    Replies: 0
    Last Post: 01-31-2008, 03:17 AM
  3. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  4. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  5. socket question
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 07-19-2002, 01:54 PM