How Make Client?
Closed this issue · 6 comments
Hello, how to make a client from this server by an easy way?
I know that server and client have almost equal code but I tried so hard and without success.
Not sure why you would say, that server and client have almost equal code, I don't think I would agree on that. A client would send different messages and would of course need an API (or a command line interface) so you could tell which files to upload and download and how to manipulate and retrieve the directory structure.
There are of course some parts that one could keep, like the code for sending and retrieving files. But there is no "easy way", as fineFTP currently only implementes the Server.
If this question is just about having a C/C++ FTP Client library, I recommend taking a look at libcurl. This is what I am using at the client side. It will not look as clean as FineFTP (as it is pure C), but it is very well implemented and widely used, so you shouldn't experience major bugs.
Hm, do you have some git repos where using this FTP client? I don't want and not interesting in other things I used to use this server but I just need client for it.
You can take a look at eCAL. That's the project FineFTP was intially developed for. We use libcurl there as a client to upload to the FTP Server created by FineFTP:
https://github.com/continental/ecal/blob/master/app/rec/rec_client_core/src/job/ftp_upload_thread.cpp
If you are looking for a standalone application you can try out FileZilla.
https://filezilla-project.org/
I have the last question. Could you explain some little about that file (e.g. how to use it) and if I correctly understand that file only for uploading files?
That file is not meant to be used in other projects. It is part of eCAL. Maybe you should start by reading some libcurl examples:
https://curl.haxx.se/libcurl/c/example.html
They have some examples regarding FTP.
Thanks I'll think something.