From owner-freebsd-questions Fri Nov 10 7:51:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id BBF9237B479 for ; Fri, 10 Nov 2000 07:51:38 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id eAAFoKq08894; Fri, 10 Nov 2000 07:50:20 -0800 (PST) Date: Fri, 10 Nov 2000 07:50:20 -0800 From: Alfred Perlstein To: j mckitrick Cc: freebsd-questions@FreeBSD.ORG Subject: Re: programming a file transfer Message-ID: <20001110075020.D11449@fw.wintelcom.net> References: <20001110152915.A18715@dogma.freebsd-uk.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20001110152915.A18715@dogma.freebsd-uk.eu.org>; from jcm@FreeBSD-uk.eu.org on Fri, Nov 10, 2000 at 03:29:15PM +0000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * j mckitrick [001110 07:29] wrote: > > 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? You should be fine doing that. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message