|
Boost Users : |
Subject: Re: [Boost-users] Transferring files across a network.
From: Andrew Maclean (andrew.amaclean_at_[hidden])
Date: 2009-01-21 23:13:47
Thankyou Raul for your example code.
For the server I have been able to modify the code so that instead of
exiting after getting a file it sits and waits indefinitely (see the
attached code). I don't know whether this is "correct" but it seems to
work Ok. Any advice is appreciated.
Now my problem is that I want the client to send several files instead
of just one before exiting. In the final application groups of files
will need to be sent on a periodic basis. I really can't see how to do
it, I have tried to create a similar structure to that for the
modified server code but I am not having much luck.
I must admit this is a new area for me!
So any help is appreciated.
Thanks in advance for any help.
Andrew
On Fri, Jan 16, 2009 at 6:03 PM, master master
<master_4_master_at_[hidden]> wrote:
>
> Hello Andrew,
>
> I hope attached files will help you. This is a client that can send files to
> server. I got this example from Boris and it is working at my side.
>
> Thank you
> Rahul
>
> To create something exceptional
> ________________________________
> -Master4Master
>
> "Confidentiality Warning: This message and any attachments are intended only
> for the use of the intended recipient(s), are
> confidential, and may be privileged. If you are not the intended recipient,
> you are hereby notified that any review, re-transmission, conversion to hard
> copy, copying, circulation or other use of this message and any attachments
> is strictly prohibited. If you are not the intended recipient, please notify
> the sender immediately by return email, and delete this message and any
> attachments from your system.
>
> Virus Warning: Although I have taken reasonable precautions to ensure no
> viruses are present in this email, I cannot accept responsibility for any
> loss or damage arising from the use of this email or attachment."
>
> Speak out for justice and peace,
> even if your voice trembles.
>
>
>
> ________________________________
> From: Andrew Maclean <andrew.amaclean_at_[hidden]>
> To: boost-users_at_[hidden]
> Sent: Friday, 16 January, 2009 9:22:42 AM
> Subject: [Boost-users] Transferring files across a network.
>
> We have a situation where there are several computers that have a
> folder where files are periodically deposited.
>
> Currently, in each computer, this folder is scanned periodically and
> the files are parsed by a program that then sends the SQL data to a
> central machine where there is postgresql server running.
>
> The files are generally small because they are compressed. But the
> uncompressing and subsequent parsing into SQL strings dramatically
> inflates the amount of data that is sent across the network.
>
> What I am thinking of doing is sending the all the files to a
> directory on the central machine then parsing them there for
> subsequent inclusion into the database.
>
> So I need a program to periodically scan the folder on the computer
> and send these files to the central machine. On the central machine I
> need a similar program to listen for incoming files and put them into
> a directory for subsequent processing. The listner on the central
> machine will need to process files arriving simultaneously from
> several machine. There is no issue with file name conflicts as the
> names are unique.
>
> Can anyone give me any pointers? I think I should use boost asio but I
> don't know where to start with it. The tutorial and examples, while
> good haven't provided me with an insight yet!
>
> The main requirement I have is that it should be cross-platform. I
> looked at cURL/cURLpp but there are immense difficulties building this
> in a windows environment.
>
> I would like to stick with boost if possible.
>
> Thanks
> Andrew
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
> Centre for Autonomous Systems
> The Rose Street Building J04
> The University of Sydney 2006 NSW
> AUSTRALIA
> Ph: +61 2 9351 3283
> Fax: +61 2 9351 7474
> URL: http://www.acfr.usyd.edu.au/
> ___________________________________________
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
> ________________________________
> Add more friends to your messenger and enjoy! Invite them now.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- ___________________________________________ Andrew J. P. Maclean Centre for Autonomous Systems The Rose Street Building J04 The University of Sydney 2006 NSW AUSTRALIA Ph: +61 2 9351 3283 Fax: +61 2 9351 7474 URL: http://www.acfr.usyd.edu.au/ ___________________________________________
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net