Thread View: borland.public.cppbuilder.internet.socket
6 messages
6 total messages
Started by Miguel Gimenez
Tue, 04 Dec 2007 23:47
TIdPOP3->Connect() doesn't return
Author: Miguel Gimenez
Date: Tue, 04 Dec 2007 23:47
Date: Tue, 04 Dec 2007 23:47
15 lines
1341 bytes
1341 bytes
I'm using TIdPOP3 with Indy 9.0.17 and BCB5. Thanks to Remy the diagnostics via exception is working, except in two cases where the Connect(5000) command doesn't ever return, hanging the application. - If I set Port to a working non POP port (80, for example) - If I activate SSL for a non-SSL server The programs works OK with a GMail account (port 995 and SSL ON), so I think this is not the problem. This cases are possible, as the users are not experts. Is there any way to avoid this? TIA Miguel Gimenez
Re: TIdPOP3->Connect() doesn't return
Author: Remy Lebeau (TeamB)
Date: Wed, 05 Dec 2007 00:34
Date: Wed, 05 Dec 2007 00:34
18 lines
1677 bytes
1677 bytes
"Miguel Gimenez" <me@privacy.net> wrote in message news:4755e726$1@newsgroups.borland.com... > - If I set Port to a working non POP port (80, for example) The POP3 protocol defines a greeting command that the server is required to send to the client upon initial connection. TIdPOP3::Connect() waits for that greeting to arrive. Port 80, however, is an HTTP port, not a POP3 port. The HTTP protocol has no greeting. So Connect() establishes a connection to a server but then ends up waiting for data that never arrives. > Is there any way to avoid this? Set the ReadTimeout property. It is set to infinite by default. Gambit
Re: TIdPOP3->Connect() doesn't return
Author: Miguel Gimenez
Date: Wed, 05 Dec 2007 09:07
Date: Wed, 05 Dec 2007 09:07
22 lines
1868 bytes
1868 bytes
Remy Lebeau (TeamB) escribi�: > "Miguel Gimenez" <me@privacy.net> wrote in message > news:4755e726$1@newsgroups.borland.com... > >> - If I set Port to a working non POP port (80, for example) > > The POP3 protocol defines a greeting command that the server is required to > send to the client upon initial connection. TIdPOP3::Connect() waits for > that greeting to arrive. Port 80, however, is an HTTP port, not a POP3 > port. The HTTP protocol has no greeting. So Connect() establishes a > connection to a server but then ends up waiting for data that never arrives. > >> Is there any way to avoid this? > > Set the ReadTimeout property. It is set to infinite by default. I thought the timeout specified in the Connect() method was enough. Now it works properly, thanks again. -- Best regards Miguel Gimenez
Re: TIdPOP3->Connect() doesn't return
Author: Miguel Gimenez
Date: Wed, 05 Dec 2007 09:25
Date: Wed, 05 Dec 2007 09:25
14 lines
1372 bytes
1372 bytes
Remy Lebeau (TeamB) wrote: >> Is there any way to avoid this? > > Set the ReadTimeout property. It is set to infinite by default. I thought that the Connect() timeout was enough, now the wrong port part works correctly. The SSL part still hangs, I've been looking for timeouts in this component to no avail. -- Best regards Miguel Gimenez
Re: TIdPOP3->Connect() doesn't return
Author: Remy Lebeau (TeamB)
Date: Wed, 05 Dec 2007 17:59
Date: Wed, 05 Dec 2007 17:59
16 lines
1547 bytes
1547 bytes
"Miguel Gimenez" <me@privacy.net> wrote in message news:47566e9d$1@newsgroups.borland.com... > I thought that the Connect() timeout was enough No, because this is not a connection issue, it is a data reading issue. There are separate timeouts for those issues. > The SSL part still hangs, I've been looking for timeouts > in this component to no avail. There aren't any. What is our EXACT setup when using TIdPOP3 with SSL? Gambit
Re: TIdPOP3->Connect() doesn't return
Author: Miguel Gimenez
Date: Wed, 05 Dec 2007 20:34
Date: Wed, 05 Dec 2007 20:34
63 lines
2692 bytes
2692 bytes
Remy Lebeau (TeamB) escribi�: > "Miguel Gimenez" <me@privacy.net> wrote in message > news:47566e9d$1@newsgroups.borland.com... > >> I thought that the Connect() timeout was enough > > No, because this is not a connection issue, it is a data reading issue. > There are separate timeouts for those issues. > >> The SSL part still hangs, I've been looking for timeouts >> in this component to no avail. > > There aren't any. What is our EXACT setup when using TIdPOP3 with SSL? IdPOP31: APOP = false ASCIIFilter = false BoundIP = "" BoundPort = 0 Host = "pop.solener.com" Intercept = "" IOHandler = UseSSL ? IdSSLIOHandlerSocket1 : NULL MaxLineAction = maSplit MaxLineLength = 16384 Name = "IdPOP31" Password = "password" Port = 110 ReadTimeout = 6000 RecvBufferSize = 32768 SendBufferSize = 32768 Tag = 0 Username = "username" IdSSLIOHandlerSocket1: Name = "IdSSLIOHandlerSocket1" SocksInfo = "" SSLOptions CertFile = "" CipherList = "" KeyFile = "" Method = sslvSSLv2 Mode = sslmUnassigned RootCertFile = "" VerifyDepth = 0 VerifyDirs = 0 VerifyMode = [] Tag = 0 UseNagle = true The program works fine with "normal servers" (port 110, no SSL) and Gmail (port 995, SSL). If I set no SSL for a Gmail server I get an EIdReadTimeout exception, as expected. If I set SSL for a non-SSL server, the applications hangs on IdPOP31->Connect(). I'm using the OpenSSL library pair from the Indy page. Maybe one of these libraries who halts waiting for a valid SSL packet. Best regards Miguel Gimenez
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