When I send a message from one device to another, during the process during which the other device is receiving the data, is that data stored temporarily on some place on the device or is it immediately stored on the hard-drive of the device. and while using TCP when you receive an ACK does this mean that that data has been stored on the hard drive or is it stored when everything is received. For example, I am sending an essay to a server which makes a download link for another person and then send that link back to me, for sharing. Now during the process of sending that essay on the server I cancel halfway, so can I determine whether the essay was stored on its main drive or not (just an example).

  • 1
    $\begingroup$ Nothing goes directly to the hard drive. $\endgroup$ Aug 2 '17 at 18:40
  • $\begingroup$ Let's take the discussion about whether this question is on-topic to Meta: cs.meta.stackexchange.com/q/1405/755. $\endgroup$
    – D.W.
    Aug 2 '17 at 20:43

Briefly, communication between two hosts/peers on a network occurs by means of network sockets. Roughly a socket is pair (IP,PORT) of numbers which uniquely identifies a host on a network. So, when a host A sends data to another host B on the network, B listens to a corresponding port for incoming data. Data (payload) comes byte-by-byte and when one byte of data riches destination B gets notification. At this point it is up to the application what to do with data: to store it on the hard drive or in memory. Nothing is stored in HDD or on some other device by default.

As for "sending an essay to a server" your are talking about file transfer protocols, in particular file uploads. Whether your file was stored on the server depends on the underlying protocol. For example recently people have started talking about resumable file upload protocol.

Your questions say that you should start learning from basic TCP/IP and HTTP protocols, and move towards more advanced and specific protocols depending on your tasks.

  • $\begingroup$ so basically regarding my question you mean that is depends on the application. it can be stored directly in the memory and then the next byte comes to join the previous one? $\endgroup$
    – user75645
    Aug 2 '17 at 19:24
  • $\begingroup$ It is you/your processes who stores it in memory or other place. What operating system (TCP/IP stack) is do is reliably deliver you a payload/data. Imagine a postman delivers your a letter. It is up to you where to store your letter: in a drawer, or on a bookshelf. $\endgroup$
    – fade2black
    Aug 2 '17 at 19:31
  • $\begingroup$ so it depends on the software used on the server and what is this other place u refer to? $\endgroup$
    – user75645
    Aug 2 '17 at 19:38
  • $\begingroup$ Resumable file upload protocol? It is an open protocol built on HTTP which, as its name implies, provides a mechanism for resumable file uploads. Please read, it is documented. $\endgroup$
    – fade2black
    Aug 2 '17 at 19:42
  • $\begingroup$ are data packets that are received stored individually or all together? $\endgroup$
    – user75645
    Aug 2 '17 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy