From owner-freebsd-questions Fri Feb 18 21:43: 6 2000 Delivered-To: freebsd-questions@freebsd.org Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by hub.freebsd.org (Postfix) with ESMTP id D9A6A37BB61 for ; Fri, 18 Feb 2000 21:43:01 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id QAA44258; Sat, 19 Feb 2000 16:12:52 +1030 (CST) Date: Sat, 19 Feb 2000 16:12:52 +1030 From: Greg Lehey To: Zhibing Wang Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Help!!!! (Socket Programming) Message-ID: <20000219161252.U41278@freebie.lemis.com> References: <20000219053207.24316.qmail@web121.yahoomail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000219053207.24316.qmail@web121.yahoomail.com> WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [Format recovered--see http://www.lemis.com/email/email-format.html] On Friday, 18 February 2000 at 21:32:07 -0800, Zhibing Wang wrote: > Hi everybody: > I am doing some simple socket programming on FreeBSD 3.2. A client > connects to a server, sends several packets, then waits for > answer. I use send(), and recv(). > > The problem is, everytime the client only sends one packet then > segmentation falut, core dumpped. And the server ( recv() used in a > loop) received that packet a thousand times. > > Please tell me what's worng wiht me. It is really painful. You made a programming error. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message