Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 1998 15:07:07 -0400 (EDT)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        avalon@coombs.anu.edu.au, rminnich@Sarnoff.COM
Cc:        hackers@FreeBSD.ORG, nate@mt.sri.com
Subject:   Re: ECONNREFUSED on a READ?
Message-ID:  <199806081907.PAA19671@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806081907.PAA19671>