Re: socket question
- From: Alexandre Ferrieux <alexandre.ferrieux@xxxxxxxxx>
- Date: Fri, 30 May 2008 14:03:07 -0700 (PDT)
On May 30, 10:36 am, Stuart <bigdak...@xxxxxxx> wrote:
Perhaps somebody can help me understand this behavior..
On host1 inside the tcl shell I type
set s [socket -async host1 19000]
I get an error "couldn't open socket: connection refused". This I
expected
as I have no server listening on host1:19000
On host2 inside the tcl shell I type
set s [socket -async host1 19000]
and I get "sock5". There is still no server listening on host1:19000,
and so I'm
wondering why on host2 I don't get the "couldn't open socket:
connection refused" message?
The reason is that the [socket -async] may fail synchronously on the
local interface (pointing to the same machine), probably due to the OS
optimizing the TCP handshake on the loopback. While when you're
attempting the connection from host2, no such optimization takes
place, and the connect() syscall returns success before getting the
(failed) result from the handshake a finite amount of time later.
-Alex
.
- Follow-Ups:
- Re: socket question
- From: Stuart
- Re: socket question
- References:
- socket question
- From: Stuart
- socket question
- Prev by Date: Re: 10g with Oratcl 3.3 ?
- Next by Date: march calender events swingers clubs in new york state
- Previous by thread: Re: socket question
- Next by thread: Re: socket question
- Index(es):
Relevant Pages
|