Cloud drive server and client to store files remotely, implemented using C++.
Client can login by entering client ID to manage files across sessions.
Command | Function |
---|---|
PUT <filename_1> <filename_2> | Upload local file <filename_1> and rename it to <filename_2> in cloud drive. |
GET <filename_1> <filename_2> | Download <filename_1> and rename it to <filename_2> in local drive. |
LIST | Show the list of all files in cloud drive. |
EXIT | Close connection to server and terminate. |
Compile server/client source code.
$ g++ -o server server.cpp
$ g++ -o client client.cpp
Start server on TCP port <port_number>
.
$ ./server <port_number>
Start client and connect to server with IPv4 address <IP_addr>
and TCP port <port_number>
.
$ ./client <IP_addr> <port_number>
There are multiple versions of cloud drive server/client.
-
Support login/logout by client ID to manage cloud drive across sessions.
-
Support multiple client connections (Concurrent connections of the same ID not allowed).
-
Implemented using select().
-
Support multiple client connections.
-
Implemented using select().
-
Support multiple client connections.
-
Implemented using fork().
- Support single client connection.
Client should enter command only after the previous one is already processed by server.
Server stores files in RAM.