[Ns-bugs] [Bug 170] Tcpsocket::connect(127.0.0.1) return 0 if no server exists

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Thu May 8 12:02:55 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=170





------- Comment #4 from mathieu.lacage at sophia.inria.fr  2008-05-08 15:02 -------
(In reply to comment #3)

> But to answer your question, if this were BSD sockets, yes, I would expect a
> connect() request on a TCP socket to block until some kind of positive or
> negative response came back from the network or the server in question.  If the
> response was a SYN ACK from the server it would ACK the SYN ACK and then put
> the socket into established and wake the connect() returning to the client.
> 
> This is how I remember it working back in the year 1725 anyway :-)

I did look the linux tcp code and did not find anything which would make
connect block in this case. i.e., the relevant code I found:
net/ipv4/tcp_output.c:tcp_connect

This is not a big deal but I was curious.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list