Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ソケットからファイルを読み取ろうとしています。読み取り後にタイムアウトで選択を使用して終了します。
select(maxfdp1, &rset, NULL, NULL, &timeout);
しかし、送信されるファイルのサイズがすぐにわかっていれば、適切な量のバイトを取得した後、すぐに終了できました。
転送する前にファイルサイズ全体を取得できますか?
または、転送が完了したらすぐに終了するには何を使用すればよいですか?