Sign in to follow this  
Followers 0
automationexpert12345

Best method to send a file back to the client from a connected server?

2 posts in this topic

I have an application (split into both a client and server module) that uses UDP to provide notification of an incoming data manipulation request to the server. Once this manipulation has completed, I would like the server to send back a .CSV file to the client and store that in a directory of the client's choosing. (Ideally, using TCP). How would this work, especially considering the ports have been forwarded at the router level to access the server from the client, but not vice-versa.

In my mind, here are the ways I can accomplish this:

1. Send the small .CSV file (but won't always be small) via _SMTPEmail() *** Would work but isn't the most practical way -- I would like to complete the circuit within the application, and not involve e-mail.

2. Transfer the file to an FTP site *** Would work, but again, not the most practical way and involves another step.

3. Upload to an apache server *** Would work, but again, not the most practical way and involves another step.

So, is there anyone out there with experience in both receiving data at the server, and then sending a file back to the client? After looking through dozens of posts on the forums here, I've only come across articles where the client is sending to the server, and not vice-versa.

Thanks very much for your time and assistance.

- Jon

Share this post


Link to post
Share on other sites



application ... that uses UDP to provide notification ... to the server. Once this manipulation has completed, I would like the server to send back a .CSV file to the client and store that in a directory of the client's choosing. (Ideally, using TCP). How would this work, especially considering the ports have been forwarded at the router level to access the server from the client, but not vice-versa.

By definition, the client makes the requests , the server provides responses.

So... once the client "provides notification", it needs to generate another request "send me data".

As you mention, you could have the server respond with a URI that could spawn a separate app to handle, use InetGet() to retrieve the file, use the existing UDP connection to transfer the bytestream, or create a new TCP connection and do the same.

What you choose depends primarily on speed, reliability, and error handling considerations.


Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0