From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <022a01c0d999$94f34b10$e8b7c6d4@SOMA> From: "Boyd Roberts" To: <9fans@cse.psu.edu> References: <200105101813.TAA09742@localhost.localdomain> Subject: Re: [9fans] snprint(), getfields() specification MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Date: Thu, 10 May 2001 23:38:41 +0200 Topicbox-Message-UUID: 9e53f726-eac9-11e9-9e20-41e7f4b1d025 From: "Steve Kilbane" > > I'd say adopt the other UNIX convention, and return -1. The arguments > aren't "right" - insufficient space - so do nothing. It moves the > speculative behaviour onto the user. no, return a value so you have the best possible idea of why it didn't 'work'. if it was a space problem, allocate more space, loop. i recall that netscape on windows 3 allowed you to specify how many tcp connection it would manage at once and the i/o buffer size. should you try a > 16kb read/write bad things happened to your winsock dll. my dll, which called winsock while doing all the socks 4 work, had a parameter in the ini file to split the i/o's up into chunks and then return the total read/written. should the dll get an i/o error you'd get a short i/o so you'd continue with the bit that was left and then get an error. err, of course, i'm referring to a correctly written winsock application. yeah, i suffered that sort of junk for 2 years -- ouch.