dcsimg
Results 1 to 8 of 8

Thread: File Sender?

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2009
    Posts
    37

    Exclamation File Sender?

    Can I make a file sender(with progress and information like: 300KB/s) like this?

    Thanks a lot~~~

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: File Sender?

    You can certainly do most of that using TCPClient and TCPListener - the only bit I'm not sure about is the kb/s rate.

    If you search this form or just a general google search for those terms you should find plenty examples of how to do it.

  3. #3

    Re: File Sender?

    For kb/s, I don't know really, but you can show a total progress.

    Get the file size, and divide by how many you have send and multiply by 100 (or is it 10)

  4. #4
    Member
    Join Date
    Dec 2007
    Posts
    58

    Re: File Sender?

    Quote Originally Posted by formlesstree4 View Post
    For kb/s, I don't know really, but you can show a total progress.

    Get the file size, and divide by how many you have send and multiply by 100 (or is it 10)
    It would be

    (Amount Sent)/(Total File size)*100

    but if you know the amount sent you can work out the KB/s just

    (Bytes Sent/1000)/(Elapsed Time)
    Last edited by eldara; Jul 12th, 2009 at 01:05 PM.

  5. #5

    Re: File Sender?

    Yeah that, I had the idea down, I just forgot how the equation was..

  6. #6
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: File Sender?

    If you know how many bytes you have sent, and you know at what point you started sending, then it won't be rocket-science to work out how many kb per second!

  7. #7
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,020

    Re: File Sender?

    Quote Originally Posted by keystone_paul View Post
    If you know how many bytes you have sent, and you know at what point you started sending, then it won't be rocket-science to work out how many kb per second!
    Altough that would give an average kb/second for the entire transfer, and not the current speed. I dont know if thats what the OP wants though.

    leon, have a look at this thread. I posted two very simple classes for file transfers in it. You might learn a thing or two from it.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  8. #8

    Thread Starter
    Member
    Join Date
    Apr 2009
    Posts
    37

    Re: File Sender?

    oops~Thank you Atheist~

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width