Results 1 to 10 of 10

Thread: File Sending

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    The Sea of Tranquility
    Posts
    252

    File Sending

    I've been trying to do this on and off for ages, yeah file sending is easy over a network but is it possible using winsock or any api to send a file over the internet to a remote computer?. I know its possible as some remote desktop apps do it. It would be serverless. I.e just direct computer to computer information sending.

    If anyone knows any links, has any sample code, or even and idea how to do it would be much apreciated. I know its going to be damn nigh impossible with filewalls and routers around. Possibly something that "Punches holes"

    Im using VB6.


    Rich

  2. #2
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: File Sending

    you can send a file using winsock you need your vb app running on both computers, there is a winsock file sending tutorial here:

    www.winsockvb.com
    Chris

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    The Sea of Tranquility
    Posts
    252

    Re: File Sending

    Thanks but would this work over the internet will all sorts of firewalls and other obstacles?

    Rich

  4. #4
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: File Sending

    it will work over the internet, and as for firewalls it depends what settings are in place. It should work fine unless the user denys the vb app internet access.

    the biggist obstacle of all is the router, the way it will work is...one app will listen for a connect attempt, and the other app will make the connect attempt. So the one which listens (server) must be able to listen on a port, and if it uses a router for internet access, the user will need to forward the port on the router, so that when the router receives the connect attempt, it will pass it onto the network computer so that the vb app can accept.

    but if none use a router, then it will direct connect and be fine
    Chris

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    The Sea of Tranquility
    Posts
    252

    Re: File Sending

    Lol, i have a wireless router, probably why most of my attempts have failed, port forwarding isnt really an option cause I won't have acess to any remote routers.

    Rich

  6. #6
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: File Sending

    yea just remember you only need to forward the port on the router of the computer who is listening.
    Chris

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Feb 2006
    Location
    The Sea of Tranquility
    Posts
    252

    Re: File Sending

    Is there any way of solving the problem of the router, i know MSN messenger sends its files to the MS server first, but it must be able to get past routers some how as I can receive files.

    Rich

  8. #8
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: File Sending

    I thought MSN sent files directly, maybe it sends them to the server if both people are using routers, I think you might be able to get around the problem by using ports that might already be forwarded like 80, 25, 110 etc, but other than that im not sure, I think it can be done because I have seen a few apps that do it, I know my bit torrent client listens but im not sure if anything actually connects.
    Chris

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,692

    Re: File Sending

    Quote Originally Posted by the182guy
    I thought MSN sent files directly, maybe it sends them to the server if both people are using routers, I think you might be able to get around the problem by using ports that might already be forwarded like 80, 25, 110 etc
    They're not "already forwarded". If you make an outgoing request your router allows the response to get back to you. Set up IIS on port 80 and see how fast someone outside yor router can connect to it. You're getting out on port 80 (or you wouldn't be here), but no one can get into your port 80 from outside unless you forward it.

    In order to get an incoming request you need a proxy server (an intermediary site), which turns the situation into your request and the other person's request both being outgoing to the server, or you need to forward the port to the computer that's listening on that port.

    I know my bit torrent client listens but im not sure if anything actually connects.
    Most bit torrents run in either one of two modes. If you can listen you get faster downloads. (Share and you get rewarded.) If you can't listen you can still download, but your speed won't be blindingly fast.

    But in most situations, the only router you have to forward ports on is the one you're connected to - wired or wireless makes no difference. You may have a problem if your modem is also doing address translation, but that's still a local problem and easy to solve. http://www.portforward.com/english/r...outerindex.htm is the place to go to see how to set your particular equipment up for your particular port(s), or go to their forum (link at the top of that page) and post a question.

  10. #10
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: File Sending

    Quote Originally Posted by Al42
    They're not "already forwarded". If you make an outgoing request your router allows the response to get back to you. Set up IIS on port 80 and see how fast someone outside yor router can connect to it. You're getting out on port 80 (or you wouldn't be here), but no one can get into your port 80 from outside unless you forward it.

    In order to get an incoming request you need a proxy server (an intermediary site), which turns the situation into your request and the other person's request both being outgoing to the server, or you need to forward the port to the computer that's listening on that port.

    Most bit torrents run in either one of two modes. If you can listen you get faster downloads. (Share and you get rewarded.) If you can't listen you can still download, but your speed won't be blindingly fast.

    But in most situations, the only router you have to forward ports on is the one you're connected to - wired or wireless makes no difference. You may have a problem if your modem is also doing address translation, but that's still a local problem and easy to solve. http://www.portforward.com/english/r...outerindex.htm is the place to go to see how to set your particular equipment up for your particular port(s), or go to their forum (link at the top of that page) and post a question.
    1.where exactly did i say that one must forward a port to make an outgoing request? My web server listens on port 80 and can accept connection through the router, and there is no port forwarding set up.

    2.there is no need for a proxy server you literally only need to forward the port, and the network host will be able to receive connection attempts. The router acts as the proxy server

    3. there is no public bit torrent client which allows you to download without upload. If there was, nobody would upload, which defeats the purpose of p2p. All bt clients regulate your download speed according to your upload speed, so in short, the fast you upload, the faster you download
    Chris

Posting Permissions

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



Click Here to Expand Forum to Full Width