-
Couldn't load subscription status.
- Fork 1
Communication between Client and Storage server
Client needs for a connection to the storage server in 2 cases:
- Client wants to download a file
- Client wants to upload a file
In both cases the scenario of getting access to the server is the same.
- Client asks an address of the Storage Server from Name Server.

- Client sends a request to the storage server.

But protocols differ because of the case of connection.
The request to the Storage Server is following:

Server already knows everything we need about us: who we are, what we want to do, the size of the file. Name Server tells it.
In the case if we want to upload the file, we need just to send the content of the file. Server already knows the size of the file and where to save it. And it automatically closes the connection after receiving the file.
In the case if we want to download the file, server will send us a response of following format:

After sending us the file, the server will automatically close the connection.
Lost? Return to the home page