From owner-freebsd-questions Fri Nov 10 7:29:19 2000 Delivered-To: freebsd-questions@freebsd.org Received: from probity.mcc.ac.uk (probity.mcc.ac.uk [130.88.200.94]) by hub.freebsd.org (Postfix) with ESMTP id 63A4337B479 for ; Fri, 10 Nov 2000 07:29:17 -0800 (PST) Received: from dogma.freebsd-uk.eu.org ([130.88.200.97]) by probity.mcc.ac.uk with esmtp (Exim 2.05 #4) id 13uG79-000LKP-00 for freebsd-questions@freebsd.org; Fri, 10 Nov 2000 15:29:15 +0000 Received: (from jcm@localhost) by dogma.freebsd-uk.eu.org (8.9.3/8.9.3) id PAA18762 for freebsd-questions@freebsd.org; Fri, 10 Nov 2000 15:29:15 GMT (envelope-from jcm) Date: Fri, 10 Nov 2000 15:29:15 +0000 From: j mckitrick To: freebsd-questions@freebsd.org Subject: programming a file transfer Message-ID: <20001110152915.A18715@dogma.freebsd-uk.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, I am writing a very simple file server for a school project. I have some sample code that got me started, and I have a server that opens a socket and waits for a request from a client. The client reads from stdin and sends it to the server. I want to have the server open a specified file and send it. Can I just use fopen() and read data in chunks and send it that way? Will it get mangled? Are there any issues I need to be aware of doing this? Thanks, Jonathon -- "That depends on what the meaning of the word 'is' is." -President Bill Clinton "I don't know what you mean by the word 'ask.'" -CEO Bill Gates To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message