From owner-freebsd-hackers Mon Jun 8 12:12:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA21700 for freebsd-hackers-outgoing; Mon, 8 Jun 1998 12:12:04 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA21627 for ; Mon, 8 Jun 1998 12:11:32 -0700 (PDT) (envelope-from luoqi@lor.watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id PAA19671; Mon, 8 Jun 1998 15:07:07 -0400 (EDT) (envelope-from luoqi) Date: Mon, 8 Jun 1998 15:07:07 -0400 (EDT) From: Luoqi Chen Message-Id: <199806081907.PAA19671@lor.watermarkgroup.com> To: avalon@coombs.anu.edu.au, rminnich@Sarnoff.COM Subject: Re: ECONNREFUSED on a READ? Cc: hackers@FreeBSD.ORG, nate@mt.sri.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > darren, you just confused me. Here's the sequence again. > 5606 telnet CALL socket(0x2,0x2,0) socket(PF_INET, SOCK_DGRAM, 0), this is a UDP socket, the connect() call only assigns the default destination address (for send()). > 5606 telnet RET socket 3 > 5606 telnet CALL connect(0x3,0x200ac010,0x10) > 5606 telnet RET connect 0 > 5606 telnet CALL sendto(0x3,0xefbfcfd8,0x16,0,0,0) > 5606 telnet GIO fd 3 wrote 22 bytes > "\^B\M-Z\^A\0\0\^A\0\0\0\0\0\0\^Dc126\0\0\^A\0\^A" > 5606 telnet RET sendto 22/0x16 > 5606 telnet CALL poll(0xefbfcd88,0x1,0x2710) > 5606 telnet RET poll 1 > 5606 telnet CALL recvfrom(0x3,0xefbfd884,0x400,0,0xefbfce10,0xefbfcd7c) > 5606 telnet RET recvfrom -1 errno 61 Connection refused > 5606 telnet CALL close(0x3) > > So the socket works, the connect works, the sendto works, the poll shows > data to read, i do a recvfrom and get ECONNREFUSED? ECONNREFUSED here simply means there's no socket bound at the destination address/port. Probably you make a mistake in your code, you meant to use SOCK_STREAM to create a TCP socket. > what's normal about that, especially on a program that behaves > differently on every other freebsd and linux and solaris that we have > in-house? Am I doing something wrong that has just "happened to work" for > the last few years? > > thanks > ron > > Ron Minnich |Java: an operating-system-independent, > rminnich@sarnoff.com |architecture-independent programming language > (609)-734-3120 |for Windows/95 and Windows/NT on the Pentium > ftp://ftp.sarnoff.com/pub/mnfs/www/docs/cluster.html -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message