Article View: borland.public.cppbuilder.internet.socket
Article #4464Re: Error on reconnection to server
From: Ben
Date: Wed, 09 Feb 2005 13:31
Date: Wed, 09 Feb 2005 13:31
42 lines
2469 bytes
2469 bytes
Hi,
Some aditional information, I have been collecting some errors from the
the OnError function.
The error I get is: 10057
// MessageId: WSAENOTCONN
//
// MessageText:
//
// A request to send or receive data was disallowed because the socket
is not connected and (when sending on a datagram socket using a sendto
call) no address was supplied.
//
#define WSAENOTCONN 10057L
I don't understand the problem, the connection is up. I wait some
seconds before sending data. And test if the connection is active, which
is the case. Even after the errormessage and the ESocketError, Windows
SocketError, Illegal argument 10022 on API "WSACancelASyncRequent"
error. The connection on the server seems to be available, and the
client flags active.
if (NetworkClient->Active)
try
{
NetworkClient->Socket->SendBuf((void
*)&Message,sizeof(TCPmessageType));
} <<<< error 10022 here
catch (...)
When the program is continued, the connection flags active but no
communication is done.
port and address are correctly.
Creating the socket at runtime has the same effect.
I hope someone can help me out.
Thanks,
Ben
Technical Details
Message-ID:
<420a10ba$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<4208d668$1@newsgroups.borland.com> <4208fa07$1@newsgroups.borland.com> <4209bc24$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,7304809fda7b8b4e X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 09 Feb 2005 14:31:38 +0100 From: Ben <TerNOra@etraSPAMde.nl> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Error on reconnection to server References: <4208d668$1@newsgroups.borland.com> <4208fa07$1@newsgroups.borland.com> <4209bc24$1@newsgroups.borland.com> In-Reply-To: <4209bc24$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.126.94.138 Message-ID: <420a10ba$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1107955898 80.126.94.138 (9 Feb 2005 05:31:38 -0800) Lines: 42 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail