Article View: borland.public.cppbuilder.internet.socket
Article #2278a Client connection without Server accept() : possible ?
From: didier
Date: Thu, 01 Jun 2006 12:29
Date: Thu, 01 Jun 2006 12:29
35 lines
2027 bytes
2027 bytes
Hello everybody, As guys here seem smart, is there any explanation to this fact : 1- I launch a TCP server (socket(AF_INET, SOCK_STREAM, 0) + bind + listen) and break my prog immediately AFTER completion of listen(). So, the server is stopped here and shall NEVER accept() any connection. NOTA : the server is programmed with VisualC++2005 (8.0) 2- I launch a TCP client (socket) NOTA : the client is programmed with Borland C++ 6.0 with the VCL Lib (ClientSocket). 3- I press a button which sets the ClientSocket->Active flag to "true". This is the only thing I do with this VCL component to connect a client to a server (as far as I know). RESULT : The client tells that the connection has been successfully established with the server. I verify this with the flag ClientSocket->Socket->Connected = true ! The weird thing is that the server is breaked : which mechanism has accepted the client socket connection ? Not the server ! I cannot find any explanation. It changes my view of the listen function : it does not work as I believe... I thought that only the accept() function validates the client connection request... Any idea of test(s) to understand this behavior ? Thanks. didier
Technical Details
Message-ID:
<447eddb9$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a5bb198ebfc9fddf,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "didier" <jehanno@lal.in2p3.fr> Sender: "didier" <jehanno@lal.in2p3.fr> Reply-To: "didier" <jehanno@lal.in2p3.fr> Subject: a Client connection without Server accept() : possible ? Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 134.158.90.177 NNTP-Posting-Host: 207.105.83.66 Message-ID: <447eddb9$1@newsgroups.borland.com> Date: 1 Jun 2006 05:29:45 -0700 X-Trace: newsgroups.borland.com 1149164985 207.105.83.66 (1 Jun 2006 05:29:45 -0700) Lines: 36 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail