Thread View: borland.public.cppbuilder.internet.socket
7 messages
7 total messages
Started by Maurice
Sat, 25 Jun 2005 18:57
Socket error
Author: Maurice
Date: Sat, 25 Jun 2005 18:57
Date: Sat, 25 Jun 2005 18:57
21 lines
1511 bytes
1511 bytes
Hello,
When my client application tries to connect to a server that is not
running I get the following message:
Asynchronous socket error 10061.
I understand this is what should happen under this circumstance. Is it
possible to stop this warning and give a 'server not found' or 'not
connected' warning instead? The code snippet is given below.
void __fastcall TForm1::ConnectToServerButtonClick(TObject *Sender)
{
ClientSocket1->Port = 23;
ClientSocket1->Host = Edit3->Text;
ClientSocket1->Active = True;
}
I am using BCB6 personel and XP.
Maurice
Re: Socket error
Author: Hans Galema
Date: Sun, 26 Jun 2005 06:04
Date: Sun, 26 Jun 2005 06:04
13 lines
1332 bytes
1332 bytes
Maurice wrote: > When my client application tries to connect to a server that is not > running I get the following message: > > Asynchronous socket error 10061. That is the correct error when the host is valid but no server listens on the specofied port. You get that error in an eventhandler. Which ? Look at the ErrorCode parameter. Set it to zero. Hans.
Re: Socket error
Author: Remy Lebeau (TeamB)
Date: Mon, 27 Jun 2005 06:51
Date: Mon, 27 Jun 2005 06:51
11 lines
1114 bytes
1114 bytes
"Maurice" <moheneghan@netscape.net> wrote in message news:42bda937$1@newsgroups.borland.com... > Is it possible to stop this warning and give a 'server > not found' or 'not connected' warning instead? Use the OnError event for that. Gambit
Re: Socket error
Author: Maurice
Date: Mon, 27 Jun 2005 22:02
Date: Mon, 27 Jun 2005 22:02
19 lines
1575 bytes
1575 bytes
Hello Hans I do not know how to find the error code parameter or to set it to zero. Maurice Hans Galema wrote: > Maurice wrote: > >> When my client application tries to connect to a server that is not >> running I get the following message: >> >> Asynchronous socket error 10061. > > > That is the correct error when the host is valid but no server > listens on the specofied port. You get that error in an > eventhandler. Which ? Look at the ErrorCode parameter. Set > it to zero. > > Hans.
Re: Socket error
Author: Remy Lebeau (TeamB)
Date: Mon, 27 Jun 2005 22:11
Date: Mon, 27 Jun 2005 22:11
10 lines
1090 bytes
1090 bytes
"Maurice" <moheneghan@netscape.net> wrote in message news:42c07772$1@newsgroups.borland.com... > I do not know how to find the error code parameter or to set it to zero. Use the OnError event. Gambit
Re: Socket error
Author: Hans Galema
Date: Tue, 28 Jun 2005 08:12
Date: Tue, 28 Jun 2005 08:12
13 lines
1291 bytes
1291 bytes
Maurice wrote: > I do not know how to find the error code parameter Where did you look then ? > or to set it to zero. Once found as parameter in the named eventhandler, in that handler: ErrorCode = 0; Hans.
Re: Socket error
Author: Maurice
Date: Wed, 06 Jul 2005 07:13
Date: Wed, 06 Jul 2005 07:13
19 lines
1479 bytes
1479 bytes
Hans Galema wrote: > Maurice wrote: > >> I do not know how to find the error code parameter > Thanks Hans, I finally got there, thanks also to Remy. Maurice > > Where did you look then ? > > > or to set it to zero. > > Once found as parameter in the named eventhandler, in that handler: > > ErrorCode = 0; > > Hans.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads