git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to determine when to stop receiving pack content
@ 2019-08-10 23:47 Farhan Khan
  2019-08-11 15:04 ` Pratyush Yadav
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Farhan Khan @ 2019-08-10 23:47 UTC (permalink / raw)
  To: git

Hi,

I am trying to write an implementation of git clone over ssh and am a little confused how to determine a server response has ended. Specifically, after a client sends its requested 'want', the server sends the pack content over. However, how does the client know to stop reading data? If I run a simple read() of the file descriptor:

A. If I use reading blocking, the client will wait until new data is available, potentially forever.
B. If I use non-blocking, the client might terminate reading for new data, when in reality new data is in transit.

I do not see a mechanism to specify the size or to indicate the end of the pack content. Am I missing something?

Thanks
---
Farhan Khan
PGP Fingerprint: 1312 89CE 663E 1EB2 179C  1C83 C41D 2281 F8DA C0DE

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-12  0:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-10 23:47 How to determine when to stop receiving pack content Farhan Khan
2019-08-11 15:04 ` Pratyush Yadav
2019-08-11 22:38 ` Junio C Hamano
2019-08-11 23:31 ` Farhan Khan
2019-08-12  0:22   ` Pratyush Yadav

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).